flangee77 documentation

Add your content using reStructuredText syntax. See the reStructuredText documentation for details.

class AbstractLogHandler

Subclassed by cl7::logging::CoutLogHandler, cl7::logging::FileLogHandler, cl7::logging::HtmlLogHandler

Public Functions

AbstractLogHandler() = default
AbstractLogHandler(const AbstractLogHandler&) = delete
AbstractLogHandler &operator=(const AbstractLogHandler&) = delete
AbstractLogHandler(AbstractLogHandler&&) = delete
AbstractLogHandler &operator=(AbstractLogHandler&&) = delete
virtual ~AbstractLogHandler() noexcept = default
void on_log(const LogEntry &log_entry)

Logs the specified entry.

Private Functions

virtual void _write(const LogEntry &log_entry) = 0

Writes the specified log entry.

class AbstractPipelineObject

Subclassed by xl7::graphics::pipeline::AbstractStage, xl7::graphics::pipeline::Pipeline

Public Functions

inline bool is_dirty() const
inline void undirty()

Protected Functions

inline bool _is_dirty(unsigned dirty_flag) const
inline void _set_dirty(unsigned dirty_flag)
inline void _unset_dirty(unsigned dirty_flag)

Private Members

unsigned _dirty_flags = 0
class AbstractShaderStage : public xl7::graphics::pipeline::AbstractStage

Subclassed by xl7::graphics::pipeline::PixelShaderStage, xl7::graphics::pipeline::VertexShaderStage

Public Static Attributes

static constexpr unsigned MAX_CONSTANT_BUFFER_SLOTS = 8

The maximum number of constant buffer slots (ignoring hardware/driver capabilities).

static constexpr unsigned MAX_TEXTURE_SAMPLER_SLOTS = 16

The maximum number of texture/sampler slots (ignoring hardware/driver capabilities).

Private Functions

XL7_GRAPHICS_PIPELINE_GENERIC_STATE_BEING(shader_id, shaders::Shader::ID, shaders::Shader::ID(), DIRTY_SHADER_FLAG)
XL7_GRAPHICS_PIPELINE_STATE_ARRAY(constant_buffer_id, MAX_CONSTANT_BUFFER_SLOTS, shaders::ConstantBuffer::ID, shaders::ConstantBuffer::ID(), DIRTY_CONSTANT_BUFFER_FLAG_BASE)
XL7_GRAPHICS_PIPELINE_STATE_ARRAY(texture_id, MAX_TEXTURE_SAMPLER_SLOTS, textures::Texture::ID, textures::Texture::ID(), DIRTY_TEXTURE_SAMPLER_FLAG_BASE)
XL7_GRAPHICS_PIPELINE_STATE_ARRAY(sampler_state_id, MAX_TEXTURE_SAMPLER_SLOTS, states::SamplerState::ID, states::SamplerState::ID(), DIRTY_TEXTURE_SAMPLER_FLAG_BASE)

Private Static Attributes

static constexpr unsigned DIRTY_SHADER_FLAG = 0x1
static constexpr unsigned DIRTY_CONSTANT_BUFFER_FLAG_BASE = 0x2
static constexpr unsigned DIRTY_CONSTANT_BUFFER_FLAG_MASK = ((DIRTY_CONSTANT_BUFFER_FLAG_BASE << MAX_CONSTANT_BUFFER_SLOTS) - 1) & ~(DIRTY_CONSTANT_BUFFER_FLAG_BASE - 1)
static constexpr unsigned DIRTY_TEXTURE_SAMPLER_FLAG_BASE = 0x4 << (MAX_CONSTANT_BUFFER_SLOTS - 1)
static constexpr unsigned DIRTY_TEXTURE_SAMPLER_FLAG_MASK = ((DIRTY_TEXTURE_SAMPLER_FLAG_BASE << MAX_TEXTURE_SAMPLER_SLOTS) - 1) & ~(DIRTY_TEXTURE_SAMPLER_FLAG_BASE - 1)
struct AbstractShaderStates : public xl7::graphics::impl::direct3d11::RenderingContextImpl::HardwareStates::TextureSamplerStates

Subclassed by xl7::graphics::impl::direct3d11::RenderingContextImpl::HardwareStates::ShaderStates< ID3D11VertexShader >, xl7::graphics::impl::direct3d11::RenderingContextImpl::HardwareStates::ShaderStates< ID3D11PixelShader >, xl7::graphics::impl::direct3d11::RenderingContextImpl::HardwareStates::ShaderStates< TD3D11Shader >

struct AbstractShaderStates : public xl7::graphics::impl::direct3d9::RenderingContextImpl::HardwareStates::TextureSamplerStates

Subclassed by xl7::graphics::impl::direct3d9::RenderingContextImpl::HardwareStates::ShaderStates< IDirect3DVertexShader9 >, xl7::graphics::impl::direct3d9::RenderingContextImpl::HardwareStates::ShaderStates< IDirect3DPixelShader9 >, xl7::graphics::impl::direct3d9::RenderingContextImpl::HardwareStates::ShaderStates< TDirect3DShader9 >

class AbstractStage : public xl7::graphics::pipeline::AbstractPipelineObject
#include <AbstractStage.h>

Subclassed by xl7::graphics::pipeline::AbstractShaderStage, xl7::graphics::pipeline::InputAssemblerStage, xl7::graphics::pipeline::OutputMergerStage, xl7::graphics::pipeline::RasterizerStage

class AbstractState : public xl7::resources::Resource
#include <AbstractState.h>

Subclassed by xl7::graphics::states::BlendState, xl7::graphics::states::DepthStencilState, xl7::graphics::states::RasterizerState, xl7::graphics::states::SamplerState

Public Functions

XL7_DECLARE_RESOURCE_ID()
AbstractState() = delete
AbstractState(const AbstractState&) = delete
AbstractState &operator=(const AbstractState&) = delete
AbstractState(AbstractState&&) = delete
AbstractState &operator=(AbstractState&&) = delete

Protected Functions

template<class TDesc>
inline AbstractState(const CreateParams<TDesc> &params)
~AbstractState() override = default

Private Functions

virtual bool _check_data_impl(const resources::DataProvider &data_provider) override

Checks whether the given data provider complies with the specific properties of the resource to (re)populate it, taking into account the current state of the resource if necessary.

struct Angle
#include <Angle.h>

Public Functions

inline constexpr Angle(float radians = 0.0f) noexcept
inline void swap(Angle &a) noexcept
Angle normalized_symmetric() const

Returns a copy of this angle normalized to the range [-pi;+pi].

Angle normalized_asymmetric() const

Returns a copy of this angle normalized to the range [0;2pi].

Angle &normalize_symmetric()

Normalizes this angle to the range [-pi;+pi].

Angle &normalize_asymmetric()

Normalizes this angle to the range [0;2pi].

inline constexpr float to_radians() const

Returns the angle value in radians.

float to_degrees() const

Returns the angle value transformed to degrees.

float to_half_cycle(float half_cycle) const

Returns the angle value transformed to the specified half-cycle.

float to_cycle(float cycle) const

Returns the angle value transformed to the specified cycle.

inline bool operator==(Angle a) const
inline bool operator!=(Angle a) const
inline bool operator<(Angle a) const
inline bool operator>(Angle a) const
inline bool operator<=(Angle a) const
inline bool operator>=(Angle a) const
inline constexpr Angle operator+() const

Returns a copy of this angle unmodified.

inline constexpr Angle operator-() const

Returns a copy of this angle negated.

inline constexpr Angle operator+(Angle a) const

Returns the sum of two angles.

inline constexpr Angle operator-(Angle a) const

Returns the difference of two angles.

inline constexpr Angle operator*(float s) const

Returns a copy of this angle multiplied by the specified scalar.

inline constexpr Angle operator/(float s) const

Returns a copy of this angle divided by the given scalar.

inline constexpr Angle &operator+=(Angle a)

Adds the given angle to this one.

inline constexpr Angle &operator-=(Angle a)

Subtracts the given angle from this one.

inline constexpr Angle &operator*=(float s)

Multiplies this angle by the specified scalar.

inline constexpr Angle &operator/=(float s)

Divides this angle by the specified scalar.

inline operator float() const

Public Members

float radians

The angle in radians.

Public Static Functions

static inline constexpr Angle from_radians(float radians)

Initializes an angle in radians.

static Angle from_degrees(float degrees)

Initializes an angle in degrees.

static Angle from_half_cycle(float value, float half_cycle)

Initializes an angle from a value with the specified half-cycle.

static Angle from_cycle(float value, float cycle)

Initializes an angle from a value with the specified cycle.

class Application
#include <Application.h>

Public Functions

Application() = delete
Application(ArgumentBag argument_bag)

Explicit constructor.

Application(const Application&) = delete
Application &operator=(const Application&) = delete
Application(Application&&) = delete
Application &operator=(Application&&) = delete
virtual ~Application() = default
bool run()

Runs the application instance. Initializes the framework components, runs through the main message loop, and shuts down the framework components.

Runs the application instance. Initializes the framework components, starts the main message loop, and shuts down the framework components.

inline const ArgumentBag &get_argument_bag() const

Returns the argument bag holding a list of command-line arguments.

inline int get_exit_code() const

Returns the exit code of the application instance.

Private Functions

inline virtual bool _pre_init_impl(xl7::Config &config)

Initializes the actual application instance before initializing the framework components. The passed configuration object might be manipulated to influence the following initialization process accordingly. In the event of an error, false is returned and the application exits without continuing initialization let alone entering the main loop.

inline virtual bool _post_init_impl()

Initializes the actual application instance after the framework components have (successfully) been initialized. In the event of an error, false is returned and the application exits without even entering the main loop.

inline virtual bool _shutdown_impl()

Shuts down the application instance before the framework components are also shut down. If false is returned, the application will then be terminated in any case, even if it should actually be restarted.

inline virtual void _before_render_impl()

Prepares rendering after the scene has started.

inline virtual void _render_impl()

Performs the actual rendering.

inline virtual void _after_render_impl()

Performs follow-up stuff before ending the scene.

inline virtual void _move_impl()

Performs the application logic.

bool _init()

Initializes the application instance including the framework components.

bool _shutdown()

Shuts down the application instance including the framework components.

bool _run_loop()

Enters/runs the main message loop of the application instance.

void _loop()

Does a full application loop iteration. Therefore, it clears the render targets; prepares rendering; begins the scene; performs the actual rendering; ends the scene; presents the rendered scene by flipping the swap chain; and performs the application logic. (See _before_render, _render, _after_render, _present, and _move.)

void _before_render()

Begins the scene and prepares rendering.

void _render()

Performs the actual rendering.

void _after_render()

Performs follow-up stuff and ends the scene.

void _present()

Presents the rendered scene by “flipping” the swap chain.

void _move()

Performs the application logic.

Private Members

ArgumentBag _argument_bag

The argument bag holding a list of command-line arguments.

int _exit_code = 0

The exit code of the application instance.

bool _quit_flag = false

The flag indicating whether to quit the application.

bool _restart_flag = false

The flag indicating whether to restart the application.

class ArgumentBag
#include <ArgumentBag.h>

Public Functions

ArgumentBag() = default
ArgumentBag(int argc, char *argv[])
ArgumentBag(int argc, wchar_t *argv[])
ArgumentBag(int argc, cl7::u8char_type *argv[])
ArgumentBag(const std::vector<cl7::u8string_view> &arguments)
ArgumentBag(const std::vector<cl7::u8string> &arguments)
inline const std::vector<cl7::u8string> &get_arguments() const

Returns the “list” of command-line arguments.

inline const std::vector<cl7::u8string> &get_positional_arguments() const

Returns the “list” of positional arguments (arguments that don’t start with a “-“).

inline const std::unordered_set<cl7::u8string, cl7::string_hash<>, std::equal_to<>> &get_flags() const

Returns the set of flags (“options” without a value).

inline const std::vector<cl7::u8string> &get_option_names() const

Returns the “list” of option names (actual options with assigned values).

bool has_flag(cl7::u8string_view flag_name) const

Checks whether the specified flags was passed to the application.

bool has_option(cl7::u8string_view option_name) const

Checks whether the specified option was passed to the application.

bool has_single_value(cl7::u8string_view option_name) const

Checks whether the specified option has a single assigned value.

const cl7::u8string &get_value(cl7::u8string_view option_name) const

Returns the option value found for the specified option, or an empty string if not found. If multiple values are assigned, the last value is returned.

const std::vector<cl7::u8string> &get_values(cl7::u8string_view option_name) const

Returns a “list” of option values found for the specified option, or an empty “list” if not found.

Returns a list of option values found for the specified option, or an empty list if not found.

Private Functions

void _parse_arguments()
cl7::u8string_view _parse_short_option_or_flags(cl7::u8string_view argument)
cl7::u8string_view _parse_any_option(cl7::u8string_view argument)
void _try_add_flag(cl7::u8string_view flag_name)
void _add_flag(cl7::u8string_view flag_name)
void _add_option_value(cl7::u8string_view option_name, cl7::u8string_view option_value)

Private Members

cl7::u8string _empty_value
std::vector<cl7::u8string> _empty_values
std::vector<cl7::u8string> _arguments

The “list” of command-line arguments.

std::vector<cl7::u8string> _positional_arguments

The “list” of positional arguments (arguments that don’t start with a “-“).

std::unordered_set<cl7::u8string, cl7::string_hash<>, std::equal_to<>> _flags

The set of flags (“options” without a value).

std::vector<cl7::u8string> _option_names

The “list” of option names (actual options with assigned values).

std::unordered_map<cl7::u8string, std::vector<cl7::u8string>, cl7::string_hash<>, std::equal_to<>> _option_values

The map/assignment of option names to option values.

Private Static Functions

static void _try_resolve_quotation(cl7::u8string &option_value)
static void _resolve_quotation(cl7::u8string &option_value, cl7::u8char_type ch)
struct assertion_exception : public std::exception

Public Functions

assertion_exception() = delete
inline assertion_exception(cl7::u8string_view original_expression, cl7::u8string_view evaluated_expression, cl7::u8string_view stringification, const char *file_path, unsigned line_number)
inline char const *what() const noexcept override

Public Members

cl7::u8string original_expression
cl7::u8string evaluated_expression
Meta meta
class Attorney
#include <Registry.h>

Private Static Functions

static inline Sample *begin_sample(Registry *registry, const cl7::u8string &sample_name)
static inline void end_sample(Registry *registry, Sample *sample)

Friends

friend class Profiler
class Attorney
#include <IndexBufferImpl.h>

Private Static Functions

static inline IndexBufferImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d11::ResourceFactoryImpl
class Attorney
#include <VertexBufferImpl.h>

Private Static Functions

static inline VertexBufferImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d11::ResourceFactoryImpl
class Attorney

Private Static Functions

static inline ResourceFactoryImpl *create()

Friends

friend class RenderingDeviceImpl
class Attorney

Private Static Functions

static inline ConstantBufferImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d11::ResourceFactoryImpl
class Attorney
#include <PixelShaderImpl.h>

Private Static Functions

static inline PixelShaderImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d11::ResourceFactoryImpl
class Attorney
#include <VertexShaderImpl.h>

Private Static Functions

static inline VertexShaderImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d11::ResourceFactoryImpl
class Attorney
#include <BlendStateImpl.h>

Private Static Functions

static inline BlendStateImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d11::ResourceFactoryImpl
class Attorney

Private Static Functions

static inline DepthStencilStateImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d11::ResourceFactoryImpl
class Attorney

Private Static Functions

static inline RasterizerStateImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d11::ResourceFactoryImpl
class Attorney
#include <SamplerStateImpl.h>

Private Static Functions

static inline SamplerStateImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d11::ResourceFactoryImpl
class Attorney
#include <Texture2DImpl.h>

Private Static Functions

static inline Texture2DImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d11::ResourceFactoryImpl
class Attorney
#include <IndexBufferImpl.h>

Private Static Functions

static inline IndexBufferImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d9::ResourceFactoryImpl
class Attorney
#include <VertexBufferImpl.h>

Private Static Functions

static inline VertexBufferImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d9::ResourceFactoryImpl
class Attorney

Private Static Functions

static inline ResourceFactoryImpl *create()

Friends

friend class RenderingDeviceImpl
class Attorney

Private Static Functions

static inline ConstantBufferImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d9::ResourceFactoryImpl
class Attorney
#include <PixelShaderImpl.h>

Private Static Functions

static inline PixelShaderImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d9::ResourceFactoryImpl
class Attorney
#include <VertexShaderImpl.h>

Private Static Functions

static inline VertexShaderImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d9::ResourceFactoryImpl
class Attorney
#include <BlendStateImpl.h>

Private Static Functions

static inline BlendStateImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d9::ResourceFactoryImpl
class Attorney

Private Static Functions

static inline DepthStencilStateImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d9::ResourceFactoryImpl
class Attorney

Private Static Functions

static inline RasterizerStateImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d9::ResourceFactoryImpl
class Attorney
#include <SamplerStateImpl.h>

Private Static Functions

static inline SamplerStateImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d9::ResourceFactoryImpl
class Attorney
#include <Texture2DImpl.h>

Private Static Functions

static inline Texture2DImpl *create(const CreateParams<Desc> &params)

Friends

friend class xl7::graphics::impl::direct3d9::ResourceFactoryImpl
class Attorney
#include <MeshManager.h>

Private Static Functions

static inline MeshManager *create(IMeshFactory *factory)
static inline void destroy(MeshManager *manager)

Friends

friend class xl7::graphics::RenderingDevice
class Attorney
#include <RenderingContext.h>

Private Static Functions

static inline void destroy(RenderingContext *rendering_context)

Friends

friend class RenderingDevice
class Attorney
#include <RenderingDevice.h>

Private Static Functions

static inline void destroy(RenderingDevice *rendering_device)
static inline bool init(RenderingDevice *rendering_device)
static inline bool shutdown(RenderingDevice *rendering_device)

Friends

friend class GraphicsSystem
class Attorney
#include <ShaderManager.h>

Private Static Functions

static inline ShaderManager *create(IShaderFactory *factory)
static inline void destroy(ShaderManager *manager)

Friends

friend class xl7::graphics::RenderingDevice
class Attorney
#include <StateManager.h>

Private Static Functions

static inline StateManager *create(IStateFactory *factory)
static inline void destroy(StateManager *manager)

Friends

friend class xl7::graphics::RenderingDevice
class Attorney
#include <SurfaceManager.h>

Private Static Functions

static inline SurfaceManager *create(ISurfaceFactory *factory)
static inline void destroy(SurfaceManager *manager)

Friends

friend class xl7::graphics::RenderingDevice
class Attorney
#include <TextureManager.h>

Private Static Functions

static inline TextureManager *create(ITextureFactory *factory)
static inline void destroy(TextureManager *manager)

Friends

friend class xl7::graphics::RenderingDevice
class Attorney
#include <Resource.h>

Private Static Functions

static inline bool acquire(Resource *resource, const DataProvider &data_provider)
static inline void dispose(Resource *resource)
static inline void release(Resource *resource)
static inline void destroy(Resource *resource)

Friends

friend class ResourceManager
template<class Callable>
class auto_invoke
#include <auto_invoke.h>

Public Functions

inline explicit auto_invoke(const Callable &callable) noexcept
inline explicit auto_invoke(Callable &&callable) noexcept
auto_invoke(const auto_invoke&) = delete
auto_invoke &operator=(const auto_invoke&) = delete
inline auto_invoke(auto_invoke &&other) noexcept
inline auto_invoke &operator=(auto_invoke &&other) noexcept
inline ~auto_invoke() noexcept
inline void swap(auto_invoke &other) noexcept
inline void reset() noexcept
inline void reset(Callable &&callable) noexcept

Private Members

Callable _callable
bool _invoke = true
class Base64
#include <Base64.h>

Public Functions

Base64(const Options &options = default_options)

Default/explicit constructor.

cl7::u8string encode(cl7::byte_view data)

Encodes the specified data as Base64.

cl7::byte_vector decode(cl7::u8string_view base64)

Decodes the specified Base64 text. If the text is invalid, an empty buffer is returned.

inline const Options &get_options() const

Returns the variant options.

inline void set_options(const Options &options)

Sets the variant options.

Public Static Functions

static size_t calculate_data_size(cl7::u8string_view base64)

Calculates the number of bytes required to store the decoded data of the specified Base64 text. If the text has an invalid length, 0 is returned. However, the function does not fully validate the data.

Public Static Attributes

static constexpr Options default_options  = {.ch62=u8'+',.ch63=u8'/',.pad=true,.line_length=76,.insert_breaks=false,}

Private Functions

cl7::u8char_type _encode(uint8_t sextet) const

Returns the Base64 character of the given 6-bit character sextet.

uint8_t _decode(cl7::u8char_type chr) const

Checks the given character whether it is a valid Base64 character. If it is valid, its 6-bit character sextet will be returned. If it is invalid, an invalid value above 63 will be returned.

Private Members

Options _options

The variant options.

Private Static Functions

static uint8_t _char1(uint8_t a)

Extracts the first 6-bit Base64 character sextet from the first data byte.

static uint8_t _char2(uint8_t a, uint8_t b)

Extracts the second 6-bit Base64 character sextet from the first two data bytes.

static uint8_t _char3(uint8_t b, uint8_t c)

Extracts the third 6-bit Base64 character sextet from the second and third data bytes.

static uint8_t _char4(uint8_t c)

Extracts the fourth 6-bit Base64 character sextet from the third data byte.

static uint8_t _byte1(uint8_t a, uint8_t b)

Extracts the first data byte from the first and second 6-bit Base64 character sextets.

static uint8_t _byte2(uint8_t b, uint8_t c)

Extracts the second data byte from the second and third 6-bit Base64 character sextets.

static uint8_t _byte3(uint8_t c, uint8_t d)

Extracts the third data byte from the given third and fourth 6-bit Base64 character sextets.

Private Static Attributes

static bool _initialized = false
static cl7::u8char_type _base64_char_table[64]
static uint8_t _base64_sextet_lookup[128]
struct BitInfo

Public Members

unsigned color_type
unsigned channel_count
unsigned bits_per_pixel
unsigned max_bytes_per_pixel
unsigned bytes_per_scanline
unsigned width
unsigned height
class BlendState : public xl7::graphics::states::AbstractState
#include <BlendState.h>

Subclassed by xl7::graphics::impl::direct3d11::states::BlendStateImpl, xl7::graphics::impl::direct3d9::states::BlendStateImpl

Public Types

enum class BlendFactor

Values:

enumerator Zero
enumerator One
enumerator SrcColor
enumerator InvSrcColor
enumerator SrcAlpha
enumerator InvSrcAlpha
enumerator DestAlpha
enumerator InvDestAlpha
enumerator DestColor
enumerator InvDestColor
enumerator SrcAlphaSat
enumerator BlendFactor
enumerator InvBlendFactor
enum class BlendOperation

Values:

enumerator Add
enumerator Subtract
enumerator RevSubtract
enumerator Min
enumerator Max

Public Functions

XL7_DERIVE_RESOURCE_ID(AbstractState)
BlendState() = delete
BlendState(const BlendState&) = delete
BlendState &operator=(const BlendState&) = delete
BlendState(BlendState&&) = delete
BlendState &operator=(BlendState&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline const Desc &get_desc() const

Returns the descriptor of the blend state.

Protected Functions

inline BlendState(const CreateParams<Desc> &params)
~BlendState() override = default

Private Members

const Desc _desc

The descriptor of the blend state.

class BlendStateImpl : public xl7::graphics::states::BlendState
#include <BlendStateImpl.h>

Public Functions

BlendStateImpl() = delete
BlendStateImpl(const BlendStateImpl&) = delete
BlendStateImpl &operator=(const BlendStateImpl&) = delete
BlendStateImpl(BlendStateImpl&&) = delete
BlendStateImpl &operator=(BlendStateImpl&&) = delete
inline ID3D11BlendState *get_raw_d3d_blend_state() const

Returns the Direct3D 11 blend state interface.

Public Static Functions

static void map_d3d_values(const Desc &desc, D3D11_BLEND_DESC &d3d_blend_desc)

Maps the specified blend state descriptor to corresponding Direct3D 11 values and fills the given structure accordingly.

Protected Functions

BlendStateImpl(const CreateParams<Desc> &params)
~BlendStateImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _acquire_impl(const xl7::resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

Private Members

wrl::ComPtr<ID3D11BlendState> _d3d_blend_state

The Direct3D 11 blend state interface.

class BlendStateImpl : public xl7::graphics::states::BlendState
#include <BlendStateImpl.h>

Public Functions

BlendStateImpl() = delete
BlendStateImpl(const BlendStateImpl&) = delete
BlendStateImpl &operator=(const BlendStateImpl&) = delete
BlendStateImpl(BlendStateImpl&&) = delete
BlendStateImpl &operator=(BlendStateImpl&&) = delete
inline const D3DBlendStateTypeValues &get_d3d_blend_state_type_values() const

Returns the Direct3D 9 blend state type values.

Public Static Functions

static void map_d3d_values(const Desc &desc, D3DBlendStateTypeValues &d3d_blend_state_type_values)

Maps the specified blend state descriptor to corresponding Direct3D 9 values and fills the given structure accordingly.

Protected Functions

BlendStateImpl(const CreateParams<Desc> &params)
~BlendStateImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _acquire_impl(const xl7::resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

Private Members

D3DBlendStateTypeValues _d3d_blend_state_type_values

The Direct3D 9 blend state type values.

struct Block

Public Functions

Block(cl7::u8string_view block_class)
~Block() noexcept

Public Members

cl7::u8string block_class
class byte_reader
#include <byte_reader.h>

Public Functions

explicit byte_reader(irom *rom) noexcept

Prepares a byte reader for reading from the specified read-only memory.

cl7::byte_vector read() const

Reads and returns all available/remaining data.

size_t read(cl7::byte_span data) const

Attempts to fill the given data buffer and returns the number of bytes actually transferred.

Private Members

irom *_rom

The read-only memory to read from.

class byte_writer
#include <byte_writer.h>

Public Functions

explicit byte_writer(ifile *file) noexcept

Prepares a byte writer for writing to the specified file.

size_t write(cl7::byte_view data)

Attempts to write the given data and returns the number of bytes actually transferred.

Private Members

ifile *_file

The file to write to.

struct Capabilities
#include <RenderingDevice.h>

Public Members

struct xl7::graphics::RenderingDevice::Capabilities::Memory memory
unsigned max_simultaneous_render_target_count

The maximum number of simultaneous (color) render targets.

unsigned max_concurrent_vertex_stream_count

The maximum number of concurrent vertex data streams.

unsigned max_constant_buffer_slot_count

The maximum number of constant buffer slots for any shader.

unsigned max_texture_sampler_slot_count

The maximum number of texture/sampler slots for any shader.

unsigned max_texture_2d_width

The maximum width of 2D textures, in pixels.

unsigned max_texture_2d_height

The maximum height of 2D textures, in pixels.

unsigned max_texture_3d_size

The maximum width, height, and depth of 3D textures, in pixels.

unsigned max_cubemap_size

The maximum width and height of cubemaps, in pixels.

unsigned max_texture_array_size

The maximum number of textures in a texture array.

bool texture_2d_pow2_only

The flag that indicates whether 2D textures must have dimensions specified as powers of two.

bool texture_3d_pow2_only

The flag that indicates whether 3D textures must have dimensions specified as powers of two.

bool cubemap_pow2_only

The flag that indicates whether cubemaps must have dimensions specified as powers of two.

bool square_only

The flag that indicates whether all textures must be square.

unsigned max_aspect_ratio

The maximum texture aspect ratio (0: no limit).

struct xl7::graphics::RenderingDevice::Capabilities textures
unsigned max_anisotropy

The maximum supported anisotropy to use when sampling a texture for minification, magnification, or mip-level sampling.

cl7::Version vertex_shader_version

The maximum supported vertex shader version.

cl7::Version pixel_shader_version

The maximum supported pixel shader version.

struct xl7::graphics::RenderingDevice::Capabilities shaders
struct Channel
#include <PixelBitKit.h>

Public Members

unsigned index

The 0-based index of the channel within a pixel.

unsigned depth

The bit depth of the channel (the size of the channel, in bits). This is also the main indicator of whether the channel is involved at all.

unsigned offset

The offset/shift of the channel, in bits.

uint64_t mask

The mask of the channel within a pixel (bit-depth 1s shifted by offset bits).

uint64_t mask0

The “standalone” mask of the channel (bit-depth 1s shifted by 0 bits).

struct ChunkInfo

Public Members

uint32_t length
char type[4]
class CodeDataProvider : public xl7::resources::DefaultDataProvider
#include <CodeDataProvider.h>

Public Functions

CodeDataProvider(const ShaderCode *shader_code, const CompileOptions *compile_options)

Explicit constructor.

~CodeDataProvider() override = default
inline const ShaderCode &get_shader_code() const

Returns a reference to the shader code.

inline const CompileOptions &get_compile_options() const

Returns a reference to the compile options.

inline ShaderCode::Language get_language() const

Returns the language in which the code is given.

inline const cl7::byte_vector &get_code_data() const

Returns the actual code data.

Private Members

const ShaderCode *_shader_code

A reference to the shader code.

const CompileOptions *_compile_options

A reference to the compile options.

struct Color
#include <Color.h>

Public Functions

inline constexpr Color() noexcept

Initializes R, G, B, and A all to 0.

inline constexpr Color(float r, float g, float b, float a = 1.0f) noexcept
inline constexpr Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 0xff) noexcept
inline constexpr Color(uint32_t value, ChannelOrder channel_order)
void swap(Color &other) noexcept
inline constexpr uint8_t get_r() const
inline constexpr uint8_t get_g() const
inline constexpr uint8_t get_b() const
inline constexpr uint8_t get_a() const
inline constexpr Color &set_r(uint8_t r)
inline constexpr Color &set_g(uint8_t g)
inline constexpr Color &set_b(uint8_t b)
inline constexpr Color &set_a(uint8_t a)
inline constexpr uint32_t to_uint32(ChannelOrder channel_order) const
inline constexpr uint32_t to_rgba32() const
inline constexpr uint32_t to_argb32() const
inline constexpr uint32_t to_abgr32() const
inline constexpr uint32_t to_bgra32() const
inline const float *get_rgba_ptr() const
inline float *get_rgba_ptr()
float get_hue() const

Returns the hue of this color, with 0 <= H < 360.

float get_saturation() const

Returns the saturation of this color, with 0 <= S <= 1.

float get_lightness() const

Returns the lightness of this color, with 0 <= L <= 1.

float get_brightness() const

Returns the “value” (brightness) of this color, with 0 <= V <= 1.

Color saturated() const

Returns a copy of this color with the components clamped to the range [0;1].

Color &saturate()

Clamps the components of this color to the range [0;1].

Clamps the components to the range [0;1].

inline constexpr bool operator==(const Color &c) const

Checks whether two colors are equal. The comparison is quite fuzzy: ultimately, it is enough if the colors are the same in terms of their 32-bit unsigned-integer representation, even if the floating point values should be different.

inline constexpr bool operator!=(const Color &c) const

Checks whether two colors are unequal. The comparison is quite fuzzy: Ultimately, it is not enough for the floating point values to be different; the colors must also differ in terms of their 32-bit unsigned-integer representation.

inline constexpr Color operator+() const
inline constexpr Color operator-() const
inline constexpr Color operator+(const Color &c) const
inline constexpr Color operator-(const Color &c) const
inline constexpr Color operator*(const Color &c) const
inline constexpr Color operator/(const Color &c) const
inline constexpr Color operator*(float s) const
inline constexpr Color operator/(float s) const
inline constexpr Color &operator+=(const Color &c)
inline constexpr Color &operator-=(const Color &c)
inline constexpr Color &operator*=(const Color &c)
inline constexpr Color &operator/=(const Color &c)
inline constexpr Color &operator*=(float s)
inline constexpr Color &operator/=(float s)
inline float operator[](unsigned i) const
inline float &operator[](unsigned i)

Public Members

float r
float g
float b
float a

Public Static Functions

static Color from_hsv(float hue, float saturation, float brightness)

Factory method from hue, saturation, and “value” (brightness), with 0 <= H < 360, 0 <= S <= 1, and 0 <= V <= 1.

static Color from_hsl(float hue, float saturation, float lightness)

Factory method from hue, saturation, and lightness, with 0 <= H < 360, 0 <= S <= 1, and 0 <= L <= 1.

static inline constexpr uint8_t float_to_uint8(float x)
static inline constexpr float uint8_to_float(uint8_t x)

Public Static Attributes

static const Color ZERO = {0.0f, 0.0f, 0.0f, 0.0f}
static const Color BLACK = {0.0f, 0.0f, 0.0f, 1.0f}
static const Color WHITE = {1.0f, 1.0f, 1.0f, 1.0f}
static const Color RED = {1.0f, 0.0f, 0.0f, 1.0f}
static const Color GREEN = {0.0f, 1.0f, 0.0f, 1.0f}
static const Color BLUE = {0.0f, 0.0f, 1.0f, 1.0f}
static const Color YELLOW = {1.0f, 1.0f, 0.0f, 1.0f}
static const Color MAGENTA = {1.0f, 0.0f, 1.0f, 1.0f}
static const Color CYAN = {0.0f, 1.0f, 1.0f, 1.0f}
class ColorRenderTarget : public xl7::graphics::surfaces::RenderTarget

Public Functions

XL7_DERIVE_RESOURCE_ID(RenderTarget)
ColorRenderTarget() = delete
ColorRenderTarget(const ColorRenderTarget&) = delete
ColorRenderTarget &operator=(const ColorRenderTarget&) = delete
ColorRenderTarget(ColorRenderTarget&&) = delete
ColorRenderTarget &operator=(ColorRenderTarget&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

Protected Functions

inline ColorRenderTarget(const CreateParams<Desc> &params)
~ColorRenderTarget() override = default
struct CompileOptions
#include <CompileOptions.h>

Public Types

using MacroDefinitions = std::map<cl7::u8string, cl7::u8string>

Public Members

MacroDefinitions macro_definitions

The macro definitions for (re)compiling shaders.

cl7::u8string default_vertex_entry_point   = u8"mainVertex"

The default entry point for (re)compiling vertex shaders.

cl7::u8string default_pixel_entry_point   = u8"mainPixel"

The default entry point for (re)compiling pixel shaders.

template<class TSingleton>
class Component : public cl7::creational::Singleton<TSingleton>
#include <Component.h>

Public Types

enum class State

Values:

enumerator NotInitialized
enumerator FullyInitialized
enumerator PartiallyInitialized

Public Functions

Component(const Component&) = delete
Component &operator=(const Component&) = delete
Component(Component&&) = delete
Component &operator=(Component&&) = delete
inline bool init(const Config &config)

Initializes the component.

inline bool shutdown()

De-initializes the component.

inline const Config &get_config() const

Returns the “X” pre-config structure.

inline State get_state() const

Returns the state indicating whether the component has been initialized.

inline bool is_operational() const

Returns the flag indicating whether the component has been fully initialized.

Protected Functions

inline Component()
inline ~Component() override

Private Functions

virtual bool _init() = 0

Initializes the component.

virtual bool _shutdown() = 0

De-initializes the component.

inline virtual void _before_destroy() final

This is called just before the singleton object is destroyed. If the singleton object has cleanup functions that are virtual and therefore cannot be called from the destructor, then they should be called here.

Private Members

Config _config

The “X” pre-config structure.

State _state

The state indicating whether the component has been initialized.

struct ComposedVertexLayout

Public Functions

ComposedVertexLayout() = default
ComposedVertexLayout(const VertexBufferBinding &vertex_buffer_binding)
bool operator==(const ComposedVertexLayout &rhs) const noexcept
size_t hash() const noexcept

Public Members

xl7::graphics::meshes::VertexLayout vertex_layouts[pipeline::InputAssemblerStage::MAX_VERTEX_STREAMS] = {}
unsigned instance_data_step_rates[pipeline::InputAssemblerStage::MAX_VERTEX_STREAMS] = {}
unsigned stream_count = 0
struct Config
#include <Config.h>

Public Functions

Config()

Public Members

struct xl7::Config::Generic generic
struct xl7::Config::Video video
template<typename Titem, typename Tptr = std::unique_ptr<Titem>, typename Tcontainer = std::vector<Tptr>>
class const_ptr_forward_iterator
#include <iterators.h>

Public Types

using iterator_category = std::forward_iterator_tag
using difference_type = std::ptrdiff_t
using value_type = const Titem
using pointer = const Titem*
using reference = const Titem&

Public Functions

inline const_ptr_forward_iterator(typename Tcontainer::const_iterator it)
inline reference operator*() const
inline pointer operator->() const
inline const_ptr_forward_iterator &operator++()
inline const_ptr_forward_iterator operator++(int)

Private Members

Tcontainer::const_iterator _it

Friends

inline friend bool operator==(const const_ptr_forward_iterator &a, const const_ptr_forward_iterator &b) noexcept
inline friend bool operator!=(const const_ptr_forward_iterator &a, const const_ptr_forward_iterator &b) noexcept
class ConstantBuffer : public xl7::resources::Resource
#include <ConstantBuffer.h>

Subclassed by xl7::graphics::impl::direct3d11::shaders::ConstantBufferImpl, xl7::graphics::impl::direct3d9::shaders::ConstantBufferImpl

Public Functions

XL7_DECLARE_RESOURCE_ID()
ConstantBuffer() = delete
ConstantBuffer(const ConstantBuffer&) = delete
ConstantBuffer &operator=(const ConstantBuffer&) = delete
ConstantBuffer(ConstantBuffer&&) = delete
ConstantBuffer &operator=(ConstantBuffer&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline const Desc &get_desc() const

Returns the descriptor of the constant buffer.

bool update(const ConstantDataProvider &constant_data_provider)

Updates the contents of this constant buffer.

Protected Functions

ConstantBuffer(const CreateParams<Desc> &params)
~ConstantBuffer() override = default

Private Functions

virtual bool _acquire_impl(const ConstantDataProvider &constant_data_provider) = 0

Requests/acquires the constant buffer resource. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _update_impl(const ConstantDataProvider &constant_data_provider, bool discard, bool no_overwrite) = 0

Updates the contents of this constant buffer. The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _check_data_impl(const resources::DataProvider &data_provider) override

Checks whether the given data provider complies with the specific properties of the resource to (re)populate it, taking into account the current state of the resource if necessary.

virtual bool _acquire_impl(const resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

Private Members

const Desc _desc

The descriptor of the constant buffer.

struct ConstantBufferDeclaration

Public Members

cl7::u8string name

The name of the constant buffer.

unsigned index

The 0-based index of the constant buffer.

ConstantBufferLayout layout

The layout specification of the constant buffer.

class ConstantBufferImpl : public xl7::graphics::shaders::ConstantBuffer

Public Functions

ConstantBufferImpl() = delete
ConstantBufferImpl(const ConstantBufferImpl&) = delete
ConstantBufferImpl &operator=(const ConstantBufferImpl&) = delete
ConstantBufferImpl(ConstantBufferImpl&&) = delete
ConstantBufferImpl &operator=(ConstantBufferImpl&&) = delete

Protected Functions

ConstantBufferImpl(const CreateParams<Desc> &params)
~ConstantBufferImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

virtual bool _acquire_impl(const xl7::graphics::shaders::ConstantDataProvider &constant_data_provider) override

Requests/acquires the constant buffer resource. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _update_impl(const xl7::graphics::shaders::ConstantDataProvider &constant_data_provider, bool discard, bool no_overwrite) override

Updates the contents of this constant buffer. The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

class ConstantBufferImpl : public xl7::graphics::shaders::ConstantBuffer

Public Functions

ConstantBufferImpl() = delete
ConstantBufferImpl(const ConstantBufferImpl&) = delete
ConstantBufferImpl &operator=(const ConstantBufferImpl&) = delete
ConstantBufferImpl(ConstantBufferImpl&&) = delete
ConstantBufferImpl &operator=(ConstantBufferImpl&&) = delete

Protected Functions

ConstantBufferImpl(const CreateParams<Desc> &params)
~ConstantBufferImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

virtual bool _acquire_impl(const xl7::graphics::shaders::ConstantDataProvider &constant_data_provider) override

Requests/acquires the constant buffer resource. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _update_impl(const xl7::graphics::shaders::ConstantDataProvider &constant_data_provider, bool discard, bool no_overwrite) override

Updates the contents of this constant buffer. The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

struct ConstantBufferLayout

Public Functions

unsigned calculate_size() const

Calculates the total size of the constant buffer, in bytes.

void sort_and_adjust_padded_sizes()

Sorts the constant declarations and adjusts their padded sizes to fill any gaps within the constant buffer resulting from memory alignment.

Public Members

std::vector<ConstantDeclaration> constant_declarations

The “ordered list” of constant declarations.

struct ConstantBufferMapping

Public Functions

void try_merge_constant_mappings()

Attempts to merge consecutive constant mappings to minimize the number of entries. Ideally, this results in a single mapping entry when there is a continuous 1-to-1 mapping between (sections of) source and shader buffer. The padded sizes of the constant mappings must be set correctly for this operation to be effectively carried out as intended.

Public Members

std::vector<ConstantMapping> constant_mappings
class ConstantDataProvider : public xl7::resources::DefaultDataProvider

Public Functions

ConstantDataProvider() = default
template<class TData>
inline ConstantDataProvider(const TData *data)
~ConstantDataProvider() override = default
struct ConstantDeclaration

Public Members

cl7::u8string name

The name of the constant.

ConstantType constant_type

The constant type (bool, int, float).

ConstantClass constant_class

The constant class (scalar, vector, matrix).

unsigned row_count

The number of rows (1 if not matrix).

unsigned column_count

The number of columns (1 if scalar).

unsigned element_count

The number of (array) elements (1 if not array).

unsigned offset

The offset within the constant buffer, in bytes.

unsigned size

The actual total size of the constant, in bytes.

unsigned padded_size

The padded total size of the constant, in bytes. It is wise not to set this value manually, but via ConstantBufferLayout::sort_and_adjust_padded_sizes.

struct ConstantMapping
#include <ConstantMapping.h>

Public Members

unsigned slot_index

The 0-based index of the constant buffer, as expected by the shader.

ConstantType constant_type

The constant type (bool, int, float).

unsigned source_offset

The to-be-mapped offset within the “source” constant buffer, in bytes.

unsigned shader_offset

The mapped offset as anticipated by the shader, in bytes.

unsigned size

The actual total size of the constant, in bytes.

unsigned padded_size

The padded total size of the constant, in bytes.

template<typename T = float>
struct constants_
#include <constants.h>

Public Static Attributes

static constexpr T pi = std::numbers::pi_v<T>

The mathematical constant Pi, approximately equal to 3.14159.

static constexpr T pi2 = T(2.0f) * pi

The mathematical constant Pi times 2 (sometimes referred to as Tau).

static constexpr T pi05 = T(0.5f) * pi

The mathematical constant Pi times 0.5.

static constexpr T e = std::numbers::e_v<T>

The mathematical constant e (Euler’s number), approximately equal to 2.71828.

static constexpr T ln2 = std::numbers::ln2_v<T>

The natural logarithm of 2, approximately equal to 0.693147.

static constexpr T sqrt2 = std::numbers::sqrt2_v<T>

The square root of 2 (also known as Pythagoras’ constant).

static constexpr T sqrt3 = std::numbers::sqrt3_v<T>

The square root of 3 (also known as Theodorus’ constant).

struct Context : public tl7::reporting::IListener
#include <Context.h>

Public Functions

Context() = delete
Context(reporting::Reporter *reporter, const Meta *root_meta)
Context(const Context&) = delete
Context &operator=(const Context&) = delete
Context(Context&&) = delete
Context &operator=(Context&&) = delete
~Context() override
virtual void on_start_run(size_t count) override

Handles the start of a new test run, providing the total number of test cases (multiple executions/branches due to subcases etc. are not taken into account here).

virtual void on_start_case(const Meta &meta) override

Handles the start of the specified test case.

virtual void on_result(const Result &result) override

Handles the specified result.

virtual void on_end_case(const Stats &stats) override

Handles the specified (test case) stats at the end of a test case.

virtual void on_end_run(const Stats &stats) override

Handles the specified (final) stats at the end of a test run.

void try_post_result(const Result &result) const

Publishes the specified result by forwarding it to the reporter, with a few exceptions: In the case of a “successful presumption”, nothing happens. In the case of a “failed assertion”, a corresponding exception is thrown. All other cases will be passed unchanged.

Public Members

reporting::Reporter *const reporter

The reporter with which the context will be registered as a listener during its lifetime.

const Meta *const root_meta

The meta description of the current test case as root.

SubcaseContext subcases

The (state of) subcases that are traversed sequentially (if any).

Stats stats

The (aggregated) statistics about tests carried out within this context.

template<bool is_const, typename Titem, typename Tbase = Titem>
class continuous_forward_iterator
#include <iterators.h>

Public Types

using iterator_category = std::forward_iterator_tag
using difference_type = std::ptrdiff_t
using value_type = Titem
using pointer = std::conditional_t<is_const, const Titem*, Titem*>
using reference = std::conditional_t<is_const, const Titem&, Titem&>
using Tptr = std::conditional_t<is_const, const Tbase*, Tbase*>

Public Functions

inline continuous_forward_iterator(Tptr ptr)
inline reference operator*() const
inline pointer operator->() const
inline continuous_forward_iterator &operator++()
inline continuous_forward_iterator operator++(int)

Private Members

Tptr _ptr

Friends

inline friend bool operator==(const continuous_forward_iterator &a, const continuous_forward_iterator &b) noexcept
inline friend bool operator!=(const continuous_forward_iterator &a, const continuous_forward_iterator &b) noexcept
class CoutLogger : public tl7::reporting::IListener
#include <CoutLogger.h>

Public Functions

virtual void on_start_run(size_t count) override

Handles the start of a new test run, providing the total number of test cases (multiple executions/branches due to subcases etc. are not taken into account here).

virtual void on_start_case(const Meta &meta) override

Handles the start of the specified test case.

virtual void on_result(const Result &result) override

Handles the specified result.

virtual void on_end_case(const Stats &stats) override

Handles the specified (test case) stats at the end of a test case.

virtual void on_end_run(const Stats &stats) override

Handles the specified (final) stats at the end of a test run.

Private Functions

void _buffer_result(const Result &result)

Buffers the specified result for later output.

void _log_results()

Logs (and clears) the buffered results.

void _log_results(const std::vector<Result> &results)

Logs the specified results.

void _log_result(const Result &result)

Logs the specified result.

void _log_final_stats(const Stats &stats) const

Logs the specified (final) stats (at the end of a test run).

Private Members

bool _defer_result_output = true
size_t _total_count = 0
size_t _current_index = 0
std::map<Meta, std::vector<Result>> _buffered_results
const Meta *_current_meta = nullptr
const Meta *_logged_meta = nullptr
size_t _carriage_position = 0
bool _continue = false

Private Static Functions

static void _log_test_case(const Meta &meta)

Logs the meta description of the specified test case (called when the first problem occurs within said test case).

static void _log_signature(const Signature &signature)
class CoutLogHandler : public cl7::logging::AbstractLogHandler
#include <CoutLogHandler.h>

Public Functions

CoutLogHandler() = default
CoutLogHandler(const CoutLogHandler&) = delete
CoutLogHandler &operator=(const CoutLogHandler&) = delete
CoutLogHandler(CoutLogHandler&&) = delete
CoutLogHandler &operator=(CoutLogHandler&&) = delete
~CoutLogHandler() noexcept override = default

Private Functions

virtual void _write(const LogEntry &log_entry) override

Writes the specified log entry.

struct CPUID
#include <CPUID.h>

Public Functions

CPUID()
bool capture()

Retrieves information about the system’s CPU.

Public Members

cl7::u8char_type vendor_name[12 + 1]

The vendor name.

cl7::u8char_type processor_name[48 + 1]

The processor name.

unsigned bitness

The bitness of the CPU.

unsigned frequency

The frequency of the master clock, in MHz.

unsigned hardware_concurrency

The number of concurrent threads supported by the implementation (or 0 if the value is not well-defined or not computable). The value should be considered only a hint.

Public Static Functions

static regs cpuid(unsigned eax, unsigned ecx = 0)

Performs the machine-level “cpuid” operation.

template<class TDesc>
struct CreateParams
#include <Resource.h>

Public Members

ResourceManager *manager

The owning manager of the resource to create (the manager that creates the resource).

ResourceID id

The (new) ID of the resource to create.

cl7::u8string_view identifier

The textual identifier of the resource to create (can be empty).

TDesc desc

The descriptor of the resource to create.

class Cubemap : public xl7::graphics::textures::Texture
#include <Cubemap.h>

Public Functions

XL7_DERIVE_RESOURCE_ID(Texture)
Cubemap() = delete
Cubemap(const Cubemap&) = delete
Cubemap &operator=(const Cubemap&) = delete
Cubemap(Cubemap&&) = delete
Cubemap &operator=(Cubemap&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline const Desc &get_desc() const

Returns the descriptor of the cubemap.

inline images::Image as_image(unsigned face_index) const

Returns an “image view” of the specified texture face data.

inline std::vector<images::Image> create_mipmaps(unsigned face_index, images::ResamplingMethod resampling_method = images::ResamplingMethod::LinearInterpolation) const

Creates and returns mipmaps of the specified texture face “image”.

Protected Functions

Cubemap(const CreateParams<Desc> &params)
~Cubemap() override = default

Private Members

const Desc _desc

The descriptor of the cubemap.

class D3DConstantBufferWrapper

Public Functions

D3DConstantBufferWrapper() = delete
D3DConstantBufferWrapper(xl7::graphics::shaders::ConstantBufferLayout layout)
D3DConstantBufferWrapper(const D3DConstantBufferWrapper&) = delete
D3DConstantBufferWrapper &operator=(const D3DConstantBufferWrapper&) = delete
D3DConstantBufferWrapper(D3DConstantBufferWrapper&&) = default
D3DConstantBufferWrapper &operator=(D3DConstantBufferWrapper&&) = default
~D3DConstantBufferWrapper()
inline const xl7::graphics::shaders::ConstantBufferLayout &get_layout() const

Returns the layout specification of the constant buffer.

inline unsigned get_size() const

Returns the size of the constant buffer, in bytes.

inline ID3D11Buffer *get_raw_d3d_constant_buffer() const

Returns the Direct3D 11 constant buffer interface.

inline unsigned get_reference_count() const

Returns the reference count to determine whether the constant buffer is in use.

inline cl7::byte_view get_data() const

Returns the local copy of the constant buffer data.

inline bool is_dirty() const

Returns true if the local data of the constant buffer is “dirty”.

bool matches(const xl7::graphics::shaders::ConstantBufferLayout &layout) const

Returns true if the constant buffer matches the given layout specification.

bool update(cl7::byte_view data, const xl7::graphics::shaders::ConstantMapping &constant_mapping)

Updates the local copy of the constant buffer data based on the given source data and the specified constant mapping.

bool flush()

Flushes any changes to the local copy of the constant buffer data to the hardware.

unsigned add_reference()

Increases the reference count and returns the new value.

unsigned release()

Decreases the reference count and returns the new value. When the reference count reaches zero, the hardware buffer is not actually released yet: this only happens when this object is destroyed.

Private Members

xl7::graphics::shaders::ConstantBufferLayout _layout

The layout specification of the constant buffer.

unsigned _size

The size of the constant buffer, in bytes.

wrl::ComPtr<ID3D11Buffer> _d3d_constant_buffer

The Direct3D 11 constant buffer interface.

unsigned _reference_count

The reference count to determine whether the constant buffer is in use.

std::byte *_data

The local copy of the constant buffer data.

unsigned _dirty_offset

The offset of the dirty data region, in bytes.

unsigned _dirty_size

The size of the dirty data region, in bytes.

struct D3DShaderCompiler

Public Static Functions

static xl7::graphics::shaders::ShaderCode compile_hlsl_code(const cl7::u8string &file_path, const xl7::graphics::shaders::CompileOptions &compile_options, const cl7::u8string &entry_point, const cl7::u8string &target)

Compiles HLSL code from the specified file into bytecode for a given target. The file path is also used to resolve any #include directives. If an error occurs, an object with an “unknown” language and empty data is returned.

static xl7::graphics::shaders::ShaderCode compile_hlsl_code(const xl7::graphics::shaders::ShaderCode &hlsl_code, const cl7::u8string &include_path, const xl7::graphics::shaders::CompileOptions &compile_options, const cl7::u8string &entry_point, const cl7::u8string &target)

Compiles the given HLSL code into bytecode for a given target. The include path is used to resolve any #include directives. If an error occurs, an object with an “unknown” language and empty data is returned.

class D3DShaderReflection

Public Static Functions

static bool reflect(const xl7::graphics::shaders::ShaderCode &bytecode, xl7::graphics::shaders::ReflectionResult &reflection_result_out)

Performs a “reflection” on the (compiled) shader bytecode to determine parameter declarations etc.

class D3DShaderReflection

Public Static Functions

static bool reflect(const xl7::graphics::shaders::ShaderCode &bytecode, xl7::graphics::shaders::ReflectionResult &reflection_result_out)

Performs a “reflection” on the (compiled) shader bytecode to determine parameter declarations etc.

class DataProvider
#include <DataProvider.h>

Subclassed by xl7::resources::DefaultDataProvider

Public Functions

virtual ~DataProvider() = default
void fill(cl7::byte_span target) const

Fills the given byte span with the provided data. Any specified offset of this data provider is not taken into account here; this must have been applied beforehand when defining the byte span.

void fill(cl7::byte_vector &target) const

Fills the given byte vector with the provided data. If the specified offset of this data provider is greater than 0, a corresponding number of bytes in the target vector will be skipped. In any case, the byte vector will then have a size of at least the sum of the specified offset and size of this data provider.

inline virtual size_t get_offset() const

Returns the target data offset, in bytes.

inline virtual size_t get_size() const

Returns the provided data size, in bytes.

Private Functions

virtual void _fill(cl7::byte_span target) const = 0

Fills the given byte span with the provided data. Any specified offset of this data provider is not taken into account here; this must have been applied beforehand when defining the byte span.

struct datetime
#include <datetime.h>

Public Static Functions

static long long current_msecs_since_epoch()

Returns the number of milliseconds since the “epoch”. Attention: This epoch is local. Thus, the returned value should be shared only locally, not across different systems and/or processes. But the clock in use is “steady”, so it is okay to share durations between two points in time.

class DefaultDataProvider : public xl7::resources::DataProvider

Subclassed by xl7::graphics::meshes::IndexDataProvider< TIndex >, xl7::graphics::meshes::VertexDataProvider< TVertex >, xl7::graphics::shaders::CodeDataProvider, xl7::graphics::shaders::ConstantDataProvider, xl7::graphics::textures::ImageDataProvider

Public Functions

DefaultDataProvider() = default
DefaultDataProvider(cl7::byte_view data, size_t offset = 0)
~DefaultDataProvider() override = default
inline virtual size_t get_offset() const override

Returns the target data offset, in bytes.

inline virtual size_t get_size() const override

Returns the provided data size, in bytes.

Private Functions

virtual void _fill(cl7::byte_span target) const override

Fills the given byte span with the provided data. Any specified offset of this data provider is not taken into account here; this must have been applied beforehand when defining the byte span.

Private Members

cl7::byte_view _data
size_t _offset = 0
struct Deflate
#include <Deflate.h>

Public Static Functions

static bool compress(cl7::byte_view src, cl7::byte_vector &dst)

Compresses the specified source data using the Deflate algorithm and stores the compressed data in the specified destination buffer.

static bool decompress(cl7::byte_view src, cl7::byte_vector &dst)

Decompresses the specified source data using the Inflate algorithm and stores the reconstructed data in the specified destination buffer.

class DepthStencilState : public xl7::graphics::states::AbstractState

Subclassed by xl7::graphics::impl::direct3d11::states::DepthStencilStateImpl, xl7::graphics::impl::direct3d9::states::DepthStencilStateImpl

Public Types

enum class StencilOperation

Values:

enumerator Keep

Keep the existing stencil value.

enumerator Zero

Set the stencil value to 0.

enumerator Replace

Replace the stencil value with the reference value.

enumerator IncrClamp

Increment the existing stencil value by 1 and clamp the result to the maximum value.

enumerator DecrClamp

Decrement the existing stencil value by 1 and clamp the result to 0.

enumerator Invert

Invert the bits of the existing stencil value.

enumerator IncrWrap

Increment the existing stencil value by 1 and wrap to 0 if exceeding the maximum value.

enumerator DecrWrap

Decrement the existing stencil value by 1 and wrap to the maximum value if falling below 0.

Public Functions

XL7_DERIVE_RESOURCE_ID(AbstractState)
DepthStencilState() = delete
DepthStencilState(const DepthStencilState&) = delete
DepthStencilState &operator=(const DepthStencilState&) = delete
DepthStencilState(DepthStencilState&&) = delete
DepthStencilState &operator=(DepthStencilState&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline const Desc &get_desc() const

Returns the descriptor of the depth/stencil state.

Protected Functions

inline DepthStencilState(const CreateParams<Desc> &params)
~DepthStencilState() override = default

Private Members

const Desc _desc

The descriptor of the depth/stencil state.

class DepthStencilStateImpl : public xl7::graphics::states::DepthStencilState

Public Functions

DepthStencilStateImpl() = delete
DepthStencilStateImpl(const DepthStencilStateImpl&) = delete
DepthStencilStateImpl &operator=(const DepthStencilStateImpl&) = delete
DepthStencilStateImpl(DepthStencilStateImpl&&) = delete
DepthStencilStateImpl &operator=(DepthStencilStateImpl&&) = delete
inline ID3D11DepthStencilState *get_raw_d3d_depth_stencil_state() const

Returns the Direct3D 11 depth/stencil state interface.

Public Static Functions

static void map_d3d_values(const Desc &desc, D3D11_DEPTH_STENCIL_DESC &d3d_depth_stencil_desc)

Maps the specified depth/stencil state descriptor to corresponding Direct3D 11 values and fills the given structure accordingly.

Protected Functions

DepthStencilStateImpl(const CreateParams<Desc> &params)
~DepthStencilStateImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _acquire_impl(const xl7::resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

Private Members

wrl::ComPtr<ID3D11DepthStencilState> _d3d_depth_stencil_state

The Direct3D 11 depth/stencil state interface.

class DepthStencilStateImpl : public xl7::graphics::states::DepthStencilState

Public Functions

DepthStencilStateImpl() = delete
DepthStencilStateImpl(const DepthStencilStateImpl&) = delete
DepthStencilStateImpl &operator=(const DepthStencilStateImpl&) = delete
DepthStencilStateImpl(DepthStencilStateImpl&&) = delete
DepthStencilStateImpl &operator=(DepthStencilStateImpl&&) = delete
inline const D3DDepthStencilStateTypeValues &get_d3d_depth_stencil_state_type_values() const

Returns the Direct3D 9 depth/stencil state type values.

Public Static Functions

static void map_d3d_values(const Desc &desc, D3DDepthStencilStateTypeValues &d3d_depth_stencil_state_type_values)

Maps the specified depth/stencil state descriptor to corresponding Direct3D 9 values and fills the given structure accordingly.

Protected Functions

DepthStencilStateImpl(const CreateParams<Desc> &params)
~DepthStencilStateImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _acquire_impl(const xl7::resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

Private Members

D3DDepthStencilStateTypeValues _d3d_depth_stencil_state_type_values

The Direct3D 9 depth/stencil state type values.

class DepthStencilTarget : public xl7::graphics::surfaces::RenderTarget

Public Functions

XL7_DERIVE_RESOURCE_ID(RenderTarget)
DepthStencilTarget() = delete
DepthStencilTarget(const DepthStencilTarget&) = delete
DepthStencilTarget &operator=(const DepthStencilTarget&) = delete
DepthStencilTarget(DepthStencilTarget&&) = delete
DepthStencilTarget &operator=(DepthStencilTarget&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

Protected Functions

inline DepthStencilTarget(const CreateParams<Desc> &params)
~DepthStencilTarget() override = default
struct Desc
#include <Image.h>

Public Functions

unsigned determine_pixel_stride() const

Returns the size of one pixel, in bytes.

size_t calculate_pixel_count() const

Calculates the number of pixels of the image.

size_t calculate_data_size() const

Calculates the total size of the image data, in bytes.

Public Members

PixelFormat pixel_format

The pixel format.

ChannelOrder channel_order

The channel order.

unsigned width

The width of the image, in pixels.

unsigned height

The height of the image, in pixels.

unsigned depth

The depth of the image, in pixels (if 3D image, otherwise trivially 1).

struct Desc : public xl7::graphics::meshes::MeshBuffer::Desc
#include <IndexBuffer.h>

Public Members

IndexType index_type

The type/format (16 or 32 bits) of the index buffer.

struct Desc
#include <MeshBuffer.h>

Subclassed by xl7::graphics::meshes::IndexBuffer::Desc, xl7::graphics::meshes::VertexBuffer::Desc

Public Members

resources::ResourceUsage usage

Identifies how the buffer is expected to be updated (frequency of update is a key factor).

Topology topology

The topology of the primitives that the buffer represents.

unsigned count

The number of elements within the buffer.

struct Desc : public xl7::graphics::meshes::MeshBuffer::Desc
#include <VertexBuffer.h>

Public Members

unsigned stride

The size of each vertex, in bytes.

VertexLayout vertex_layout

The layout specification of the vertices.

unsigned instance_data_step_rate

The number of instances to draw using the same per-instance data before advancing in the buffer by one element, or simply 0 if the buffer contains “regular” per-vertex data.

struct Desc
#include <ConstantBuffer.h>

Public Members

ConstantBufferLayout layout

The layout specification of the constant buffer.

struct Desc
#include <Shader.h>

Public Members

ShaderCode::Language language

The language of the (source) code on which the shader is based.

cl7::u8string entry_point

The name of the shader entry point (can be empty, especially for precompiled shaders).

struct Desc
#include <BlendState.h>

Public Members

bool is_blending_enabled = false

Enables (true) or disables (false) blending in general.

BlendFactor src_color_factor = BlendFactor::One
BlendFactor dest_color_factor = BlendFactor::Zero
BlendOperation color_operation = BlendOperation::Add
BlendFactor src_alpha_factor = BlendFactor::One
BlendFactor dest_alpha_factor = BlendFactor::Zero
BlendOperation alpha_operation = BlendOperation::Add
ChannelFlags channel_write_flags = ChannelFlags::All
struct Desc

Public Members

bool is_depth_testing_enabled = true

Enables (true) or disables (false) depth testing.

bool is_depth_writing_enabled = true

Enables (true) or disables (false) depth writing.

ComparisonFunction depth_test_function = ComparisonFunction::Less

The function used for depth testing, comparing newly rendered depth data against exiting depth data.

bool is_stenciling_enabled = false

Enables (true) or disables (false) stenciling.

unsigned stencil_test_mask = 0xffffffff

The bitmask applied to the reference value and each stencil value to determine the significant bits for the stencil test.

unsigned stencil_write_mask = 0xffffffff

The bitmask applied to values written into the stencil buffer.

StencilOperationDesc front_face_stenciling

Identifies how to use the results of the depth/stencil tests for pixels whose surface normal is facing towards the camera.

StencilOperationDesc back_face_stenciling

Identifies how to use the results of the depth/stencil tests for pixels whose surface normal is facing away from the camera.

struct Desc
#include <RasterizerState.h>

Public Members

FillMode fill_mode = FillMode::Solid

Determines the fill mode to use when rendering.

CullMode cull_mode = CullMode::Back

Indicates which triangles should be discarded (culled).

WindingOrder winding_order = WindingOrder::Clockwise

Determines the orientation of the triangles.

struct Desc
#include <SamplerState.h>

Public Members

MinMagFilterType min_filter_type = MinMagFilterType::Linear

The filtering method to use when sampling for minification.

MinMagFilterType mag_filter_type = MinMagFilterType::Linear

The filtering method to use when sampling for magnification.

MipFilterType mip_filter_type = MipFilterType::Linear

The filtering method to use when sampling for mip-level sampling.

AddressMode address_u = AddressMode::Clamp

The method to use for resolving a u texture coordinate that is outside the 0 to 1 range.

AddressMode address_v = AddressMode::Clamp

The method to use for resolving a v texture coordinate that is outside the 0 to 1 range.

AddressMode address_w = AddressMode::Clamp

The method to use for resolving a w texture coordinate that is outside the 0 to 1 range.

Color border_color = Color::ZERO

The border color to use if “Border” is specified for address_u, address_v, or address_w.

float lod_bias = 0.0f

The offset from the calculated mipmap level (default: 0). For example, if a texture should actually be sampled at mipmap level 3 and mip_lod_bias is 2, the texture will be sampled at mipmap level 5.

float min_lod = -FLT_MAX

The lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.

float max_lod = +FLT_MAX

The upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to min_lod. To have no upper limit, set this to a large value such as FLT_MAX.

unsigned max_anisotropy = 1

The maximum anisotropy to use (if applicable). Values range from 1 (default) to the maximum supported anisotropy specified in the capabilities of the rendering device.

struct Desc
#include <Surface.h>

Public Members

unsigned width

The width of the surface, in pixels.

unsigned height

The height of the surface, in pixels.

struct Desc : public xl7::graphics::textures::Texture::Desc
#include <Cubemap.h>
struct Desc : public xl7::graphics::textures::Texture::Desc
#include <Texture2D.h>
struct Desc : public xl7::graphics::textures::Texture::Desc
#include <Texture2DArray.h>

Public Members

unsigned count

The number of textures in the texture array.

struct Desc : public xl7::graphics::textures::Texture::Desc
#include <Texture3D.h>

Public Members

unsigned depth

The depth of the texture, in pixels (or the number of 2D image slices, if you like).

struct Desc
#include <Texture.h>

Subclassed by xl7::graphics::textures::Cubemap::Desc, xl7::graphics::textures::Texture2D::Desc, xl7::graphics::textures::Texture2DArray::Desc, xl7::graphics::textures::Texture3D::Desc

Public Members

resources::ResourceUsage usage

Identifies how the texture is expected to be updated (frequency of update is a key factor).

PixelFormat pixel_format

The pixel format.

ChannelOrder preferred_channel_order

The preferred channel order. (The actual channel order may vary depending on hardware capabilities.)

unsigned mip_levels

The maximum number of mipmap levels in the texture. (Use 1 for a multisampled texture; or 0 to generate a full set of subtextures, down to 1 by 1).

unsigned width

The width of the texture, in pixels.

unsigned height

The height of the texture, in pixels.

struct Diagnostic
#include <Diagnostic.h>

Public Types

enum class Severity

Values:

enumerator Error
enumerator Warning
enumerator Notice

Public Members

Severity severity

The severity level (error, warning, notice).

cl7::u8string message

The error/warning/notice message.

SourceLocation source_location

The location of the “incident” in the source text.

class Diagnostics
#include <Diagnostics.h>

Public Functions

void clear()

Erases all diagnostics.

void add(const Diagnostic &diagnostic)

Adds the specified diagnostic.

void add(Diagnostic::Severity severity, cl7::u8string_view message, const SourceLocation &source_location)

Adds the specified diagnostic.

inline const std::vector<Diagnostic> &get_all() const

Returns the “list” of all diagnostics.

inline size_t get_count() const

Returns the total number of diagnostics.

inline size_t get_error_count() const

Returns the number of errors.

inline size_t get_warning_count() const

Returns the number of warnings.

Private Members

std::vector<Diagnostic> _diagnostics

The “list” of diagnostics.

size_t _error_count = 0

The number of errors.

size_t _warning_count = 0

The number of warnings.

struct Element
#include <VertexLayout.h>

Public Functions

unsigned get_size() const

Returns the data size of this element, in bytes.

Public Members

Semantic semantic

The semantic associated with this element.

unsigned semantic_index

The 0-based semantic index for the element (only needed in case where there is more than one element with the same semantic; default: 0).

DataType data_type

The data type of the element data.

Public Static Functions

static unsigned get_size(DataType data_type)

Returns the size of the given data type, in bytes.

struct Entry

Public Members

bool is_set = false
TProxy value
struct equal_to
#include <Signature.h>

Public Functions

bool operator()(const Signature &sig1, const Signature &sig2) const
class file : public cl7::io::ifile
#include <file.h>

Public Functions

file() = default
file(const cl7::u8string &path, open_mode open_mode = open_mode::read | open_mode::write)
file(const file&) = delete
file &operator=(const file&) = delete
file(file&&) = delete
file &operator=(file&&) = delete
~file() override = default
virtual bool is_good() const override

Checks whether the file is “open” and can be used.

virtual bool is_eof() const override

Checks whether the current byte position exceeds the size of the file.

inline virtual size_t get_size() const override

Returns the size of the file, in bytes.

inline virtual size_t get_position() const override

Returns the current byte position within the file (relative to the beginning).

virtual size_t set_position(size_t position) override

(Re)sets the current byte position within the file (relative to the beginning). Returns the new/current byte position.

virtual size_t seek(ptrdiff_t relative, seek_mode seek_mode = seek_mode::current) override

(Re)sets the current byte position within the file by moving it by the specified bytes relative to the file’s beginning, end, or current position, as specified. Returns the new/current byte position.

virtual size_t read(cl7::byte_span buffer) override

Reads data from the file (at the current position) into the specified buffer and returns the number of bytes transferred.

virtual size_t read(std::byte &byte) override

Reads a single byte from the file (at the current position) and returns the number of bytes transferred (i.e. 0 or 1).

virtual size_t peek(std::byte &byte) override

“Peeks” a single byte from the file (at the current position) without extracting it. Returns the number of bytes that would have been extracted if actually read (i.e. 0 or 1).

virtual size_t write(cl7::byte_view buffer) override

Writes data to the file (at the current position) from the specified buffer and returns the number of bytes transferred.

virtual size_t write(std::byte byte) override

Writes a single byte to the file (at the current position) and returns the number of bytes transferred (i.e. 0 or 1).

virtual size_t set_size(size_t size) override

(Re)sets the size of the file, in bytes, and truncates or appends the difference in bytes accordingly. Returns the new/current file size.

virtual bool is_readable() const override

Checks whether the file is “open” and can be read.

virtual bool is_writable() const override

Checks whether the file is “open” and can be written.

bool open(const cl7::u8string &path, open_mode open_mode = open_mode::read | open_mode::write)

Opens the specified file for reading and/or writing. The seek mode specifies whether to truncate

Opens the specified file for reading and writing.

void close()

Closes the file (if opened before).

Private Functions

size_t _tell_position()
void _seek_position(size_t position)
void _seek_position(ptrdiff_t relative, seek_mode seek_mode)

Private Members

std::fstream _fstream
cl7::u8string _path
open_mode _open_mode
size_t _size = 0
size_t _position = 0
class FileLogHandler : public cl7::logging::AbstractLogHandler
#include <FileLogHandler.h>

Public Functions

FileLogHandler()
FileLogHandler(const FileLogHandler&) = delete
FileLogHandler &operator=(const FileLogHandler&) = delete
FileLogHandler(FileLogHandler&&) = delete
FileLogHandler &operator=(FileLogHandler&&) = delete
~FileLogHandler() noexcept override = default

Private Functions

virtual void _write(const LogEntry &log_entry) override

Writes the specified log entry.

Private Static Functions

static void _write_line(cl7::u8string_view line, bool truncate = false)

Writes the specified “raw” UTF-8 encoded string to the log file. If specified, the file is initially truncated.

struct Format
#include <JsonWriter.h>

Public Types

enum class Style : unsigned

Values:

enumerator SingleLine
enumerator MultiLine

Public Members

Style style = Style::MultiLine
SingleLineOptions single_line_options
MultiLineOptions multi_line_options
bool escape_unicode = false
bool allow_single_quotes = false
struct Generic
#include <Config.h>

The generic presets.

Public Members

cl7::u8string title

The main window title.

HICON icon_handle

The main window icon handle.

HICON small_icon_handle

The main window small icon handle.

struct xl7::Config::Generic window
unsigned console_key

The index of the key to toggle the console.

unsigned quit_key

The index of the key to quit the application.

bool use_hardware_cursor

The flag indicating whether to use the hardware cursor or not.

class GenericLexer : public dl7::syntax::Lexer
#include <GenericLexer.h>

Public Functions

GenericLexer() = delete
GenericLexer(const TerminalSymbolCollection *terminal_symbols, Options options)

Explicit constructor.

GenericLexer(const GenericLexer&) = delete
GenericLexer &operator=(const GenericLexer&) = delete
GenericLexer(GenericLexer&&) = delete
GenericLexer &operator=(GenericLexer&&) = delete
~GenericLexer() override = default

Private Functions

virtual std::pair<SymbolID, size_t> _recognize(cl7::u8string_view source) override

Performs a lexical analysis of the specified source text and returns the symbol ID and the lexeme of the first/next token at the very beginning.

Private Members

const TerminalSymbolCollection *_terminal_symbols

The underlying “set” of terminal symbols.

Private Static Functions

static size_t _try_match(cl7::u8string_view source, const TerminalSymbol &symbol)

Tries to match (the beginning of) the specified source text against the given terminal symbol and returns the number of characters matched (or 0).

struct Grammar
#include <Grammar.h>

A BNF-like grammar with terminal symbols and their lexical compositions, non-terminal symbols and their production sequences, and a start symbol.

Public Members

TerminalSymbolCollection terminal_symbols
ProductionRuleCollection production_rules
SymbolID start_symbol_id = -1
struct GrammarAnalyzer
#include <GrammarAnalyzer.h>

Public Static Functions

static bool validate(const Grammar &grammar)

Checks the given grammar for inconsistencies and contradictions.

class GraphicsSystem : public xl7::Component<GraphicsSystem>
#include <GraphicsSystem.h>

Subclassed by xl7::graphics::impl::direct3d11::GraphicsSystemImpl, xl7::graphics::impl::direct3d9::GraphicsSystemImpl

Public Functions

GraphicsSystem(const GraphicsSystem&) = delete
GraphicsSystem &operator=(const GraphicsSystem&) = delete
GraphicsSystem(GraphicsSystem&&) = delete
GraphicsSystem &operator=(GraphicsSystem&&) = delete
inline RenderingDevice *get_rendering_device()

Returns the rendering device.

template<class TRenderingDeviceImpl>
inline TRenderingDeviceImpl *get_rendering_device_impl()

Returns the rendering device implementation.

Protected Functions

GraphicsSystem()

Default constructor.

~GraphicsSystem() override = default

Destructor.

Protected Static Functions

static GraphicsSystem *factory_func()

Private Functions

virtual bool _init_before_rendering_device_impl() = 0

Performs preliminary initialization steps so that the rendering device can be created afterward.

virtual bool _shutdown_after_rendering_device_impl() = 0

Handles any remaining cleanup actions after the rendering device has been destroyed.

virtual RenderingDevice *_rendering_device_factory_impl() = 0

Creates the rendering device (and all of its manager objects), but without fully initializing it so that it can be initialized afterward.

virtual bool _init() final

Initializes the component.

virtual bool _shutdown() final

De-initializes the component.

bool _create_rendering_device()

Creates and initializes the rendering device.

bool _destroy_rendering_device()

De-initializes and destroys the rendering device.

Private Members

std::unique_ptr<RenderingDevice, std::function<void(RenderingDevice*)>> _rendering_device

The rendering device.

Friends

friend class cl7::creational::Singleton< GraphicsSystem >
class GraphicsSystemImpl : public xl7::graphics::GraphicsSystem

Public Functions

GraphicsSystemImpl(const GraphicsSystemImpl&) = delete
GraphicsSystemImpl &operator=(const GraphicsSystemImpl&) = delete
GraphicsSystemImpl(GraphicsSystemImpl&&) = delete
GraphicsSystemImpl &operator=(GraphicsSystemImpl&&) = delete
inline IDXGIFactoryN *get_raw_dxgi_factory() const

Returns the DXGI factory interface.

Protected Functions

GraphicsSystemImpl() = default
~GraphicsSystemImpl() override = default

Private Functions

virtual bool _init_before_rendering_device_impl() override

Performs preliminary initialization steps so that the rendering device can be created afterward.

virtual bool _shutdown_after_rendering_device_impl() override

Handles any remaining cleanup actions after the rendering device has been destroyed.

virtual RenderingDevice *_rendering_device_factory_impl() override

Creates the rendering device (and all of its manager objects), but without fully initializing it so that it can be initialized afterward.

bool _create_dxgi_factory()

Creates the DXGI factory interface.

bool _release_dxgi_factory()

Releases the DXGI factory interface.

Private Members

wrl::ComPtr<IDXGIFactoryN> _dxgi_factory

The DXGI factory interface.

Friends

friend GraphicsSystem *factory_func()
class GraphicsSystemImpl : public xl7::graphics::GraphicsSystem

Public Functions

GraphicsSystemImpl(const GraphicsSystemImpl&) = delete
GraphicsSystemImpl &operator=(const GraphicsSystemImpl&) = delete
GraphicsSystemImpl(GraphicsSystemImpl&&) = delete
GraphicsSystemImpl &operator=(GraphicsSystemImpl&&) = delete
inline IDirect3D9 *get_raw_d3d_main() const

Returns the Direct3D 9 main interface.

Protected Functions

GraphicsSystemImpl() = default
~GraphicsSystemImpl() override = default

Private Functions

virtual bool _init_before_rendering_device_impl() override

Performs preliminary initialization steps so that the rendering device can be created afterward.

virtual bool _shutdown_after_rendering_device_impl() override

Handles any remaining cleanup actions after the rendering device has been destroyed.

virtual RenderingDevice *_rendering_device_factory_impl() override

Creates the rendering device (and all of its manager objects), but without fully initializing it so that it can be initialized afterward.

bool _create_main_interface()

Creates the Direct3D 9 main interface.

bool _release_main_interface()

Releases the Direct3D 9 main interface.

Private Members

wrl::ComPtr<IDirect3D9> _d3d_main

The Direct3D 9 main interface.

Friends

friend GraphicsSystem *factory_func()
struct Group
#include <Stats.h>

Public Functions

void reset()
void update(bool success)
Group operator+(const Group &rhs) const
Group &operator+=(const Group &rhs)

Public Members

unsigned total_count = 0

The total number.

unsigned pass_count = 0

The number that passed.

unsigned fail_count = 0

The number that failed.

struct Guid
#include <Guid.h>

Public Functions

Guid()
explicit Guid(const std::array<std::byte, 16> &bytes)
explicit Guid(cl7::u8string_view string)
void swap(Guid &other) noexcept
bool is_valid() const

Returns true if the GUID does not match 00000000-0000-0000-0000-000000000000.

cl7::u8string to_string(bool uppercase = false) const

“Stringifies” this GUID object.

auto operator<=>(const Guid &other) const noexcept = default

Compares two GUID objects.

Public Members

std::array<std::byte, 16> bytes

Public Static Functions

static Guid generate()

Generates a new GUID.

static Guid parse(cl7::u8string_view string)

Parses the given GUID string.

struct HardwareStates

Public Functions

HardwareStates()

Public Members

ID3D11RenderTargetView *render_target_views[pipeline::OutputMergerStage::MAX_RENDER_TARGETS]
ID3D11DepthStencilView *depth_stencil_view
ID3D11Buffer *vertex_buffers[pipeline::InputAssemblerStage::MAX_VERTEX_STREAMS]
ID3D11Buffer *index_buffer
D3D11_PRIMITIVE_TOPOLOGY primitive_topology
ID3D11InputLayout *input_layout
ShaderStates<ID3D11VertexShader> vs
ShaderStates<ID3D11PixelShader> ps
D3D11_VIEWPORT viewport
ID3D11RasterizerState *rasterizer_state
ID3D11DepthStencilState *depth_stencil_state
ID3D11BlendState *blend_state
unsigned stencil_reference_value
Color blend_factor
struct HardwareStates

Public Functions

HardwareStates()

Public Members

IDirect3DSurface9 *render_targets[pipeline::OutputMergerStage::MAX_RENDER_TARGETS]
IDirect3DSurface9 *depth_stencil_surface
IDirect3DVertexBuffer9 *vertex_buffers[pipeline::InputAssemblerStage::MAX_VERTEX_STREAMS]
IDirect3DIndexBuffer9 *index_buffer
IDirect3DVertexDeclaration9 *vertex_declaration
ShaderStates<IDirect3DVertexShader9> vs
ShaderStates<IDirect3DPixelShader9> ps
D3DVIEWPORT9 viewport
states::D3DRasterizerStateTypeValues rasterizer_state_type_values
states::D3DDepthStencilStateTypeValues depth_stencil_state_type_values
states::D3DBlendStateTypeValues blend_state_type_values
unsigned stencil_reference_value
Color blend_factor
struct hash
#include <Signature.h>

Public Functions

size_t operator()(const Signature &sig) const
template<>
struct hash<xl7::graphics::impl::shared::meshes::ComposedVertexLayout>

Public Functions

inline size_t operator()(const xl7::graphics::impl::shared::meshes::ComposedVertexLayout &composed_vertex_layout) const noexcept
template<>
struct hash<xl7::graphics::impl::shared::meshes::VertexBufferBinding>

Public Functions

inline size_t operator()(const xl7::graphics::impl::shared::meshes::VertexBufferBinding &vertex_buffer_binding) const noexcept
template<>
struct hash<xl7::resources::ResourceID>
#include <ResourceID.h>

Public Functions

inline size_t operator()(const xl7::resources::ResourceID &resource_id) const noexcept
struct Header

Public Members

uint32_t width
uint32_t height
uint8_t bit_depth
uint8_t color_type
uint8_t compression_method
uint8_t filter_method
uint8_t interlace_method
struct Header

Public Members

uint8_t id_length
uint8_t color_map_type
uint8_t image_type
uint16_t map_start
uint16_t map_length
uint8_t map_depth
uint16_t x_origin
uint16_t y_origin
uint16_t width
uint16_t height
uint8_t pixel_depth
uint8_t image_descriptor
class HtmlLogHandler : public cl7::logging::AbstractLogHandler
#include <HtmlLogHandler.h>

Public Functions

HtmlLogHandler()
HtmlLogHandler(const HtmlLogHandler&) = delete
HtmlLogHandler &operator=(const HtmlLogHandler&) = delete
HtmlLogHandler(HtmlLogHandler&&) = delete
HtmlLogHandler &operator=(HtmlLogHandler&&) = delete
~HtmlLogHandler() noexcept override

Private Types

using BlockPtr = std::unique_ptr<Block>

Private Functions

virtual void _write(const LogEntry &log_entry) override

Writes the specified log entry.

Private Members

BlockPtr _block_ptr

Private Static Functions

static cl7::u8string _escape(std::string_view s)

Escapes the specified “raw” std::string and returns it as UTF-8 encoded text.

static cl7::u8string _escape(cl7::u8string_view u8s)

Escapes the specified “raw” UTF-8 encoded text.

Escapes the specified “raw” UTF-8 text.

static void _write_raw(cl7::u8string_view raw, bool truncate = false)

Writes the specified “raw” UTF-8 encoded text to the log file without escaping it. If specified, the file is initially truncated.

static void _write_source_location(const char *file_path, unsigned line_number, const char *function_name)

Writes certain information about the source code location from which the log entry came to the log file.

class ifile : public cl7::io::irom
#include <ifile.h>

Subclassed by cl7::io::file

Public Functions

~ifile() override = default
virtual size_t write(cl7::byte_view buffer) = 0

Writes data to the file (at the current position) from the specified buffer and returns the number of bytes transferred.

virtual size_t write(std::byte byte) = 0

Writes a single byte to the file (at the current position) and returns the number of bytes transferred (i.e. 0 or 1).

virtual size_t set_size(size_t size) = 0

(Re)sets the size of the file, in bytes, and truncates or appends the difference in bytes accordingly. Returns the new/current file size.

virtual bool is_readable() const = 0

Checks whether the file is “open” and can be read.

virtual bool is_writable() const = 0

Checks whether the file is “open” and can be written.

class IListener
#include <IListener.h>

Subclassed by tl7::Context, tl7::reporting::CoutLogger

Public Functions

virtual ~IListener() = default
virtual void on_start_run(size_t count) = 0

Handles the start of a new test run, providing the total number of test cases (multiple executions/branches due to subcases etc. are not taken into account here).

virtual void on_start_case(const Meta &meta) = 0

Handles the start of the specified test case.

virtual void on_result(const Result &result) = 0

Handles the specified result.

virtual void on_end_case(const Stats &stats) = 0

Handles the specified (test case) stats at the end of a test case.

virtual void on_end_run(const Stats &stats) = 0

Handles the specified (final) stats at the end of a test run.

class Image
#include <Image.h>

Public Functions

Image()

Default constructor. Initializes an “empty” image.

explicit Image(const Desc &desc)

Explicit constructor. Initializes an “empty” image.

Image(const Desc &desc, cl7::byte_view data, bool view_only = false)

Explicit constructor. If view_only is set to true, no data will be duplicated; instead, the image’s data view will point to the specified data view, which accordingly should persist beyond the lifetime of the image.

Image(const Desc &desc, cl7::byte_vector &&data)

Explicit constructor.

Image(const Image &other)

Copy constructor. Creates a buffer and duplicates the data regardless of whether the other image is “view only”.

Image &operator=(const Image &other)

Copy assignment operator. Creates a buffer and duplicates the data regardless of whether the other image is “view only”.

Image(Image &&other) noexcept = default

Move constructor.

Image &operator=(Image &&other) noexcept = default

Move assignment operator.

~Image() noexcept = default

Destructor.

void swap(Image &other) noexcept

Swap operation.

void swap_data(cl7::byte_vector &data)

Special swap operation. The image’s data is essentially “exported” and then remains undefined.

inline const Desc &get_desc() const

Returns the descriptor of the image.

inline PixelFormat get_pixel_format() const

Returns the pixel format.

inline ChannelOrder get_channel_order() const

Returns the channel order.

inline unsigned get_width() const

Returns the width of the image, in pixels.

inline unsigned get_height() const

Returns the height of the image, in pixels.

inline unsigned get_depth() const

Returns the depth of the image, in pixels (if 3D image, otherwise trivially 1).

inline cl7::byte_view get_data() const

Returns the image data.

bool init(const Desc &desc)

(Re)initializes an “empty” image.

bool init(const Desc &desc, cl7::byte_view data, bool view_only = false)

(Re)initializes the image based on the given data. If view_only is set to true, no data will be duplicated; instead, the image’s data view will point to the specified data view, which accordingly should persist beyond the lifetime of the image.

bool init(const Desc &desc, cl7::byte_vector &&data)

(Re)initializes the image based on the given data.

Private Members

Desc _desc

The descriptor of the image.

cl7::byte_view _data_view

The image data view.

cl7::byte_vector _data_buffer

The image data buffer (or empty if “view only”).

Private Static Functions

static bool _validate(const Desc &desc, cl7::byte_view data)

Validates the initialization data (not in terms of content, but only roughly with regard to technical aspects).

struct ImageConverter : public xl7::graphics::images::ImageProcessor
#include <ImageConverter.h>

Public Static Functions

static Image convert_image(const Image &source_image, PixelFormat pixel_format, ChannelOrder channel_order)

Copies pixel data from one image to another, possibly converting the data to the specified pixel format and/or channel order. The image size does not change.

class ImageDataProvider : public xl7::resources::DefaultDataProvider

Public Functions

ImageDataProvider()
ImageDataProvider(const images::Image *image)
ImageDataProvider(const images::ImageStack *image_stack)
~ImageDataProvider() override = default
inline const images::Image::Desc &get_image_desc() const

Returns the descriptor of the image(s).

inline unsigned get_image_count() const

Returns the number of provided images.

Private Members

images::Image::Desc _image_desc

The descriptor of the image(s).

unsigned _image_count

The number of provided images.

class ImageHandler
#include <ImageHandler.h>

Subclassed by xl7::graphics::images::PngImageHandler, xl7::graphics::images::TargaImageHandler

Public Functions

virtual ~ImageHandler() = default
bool load_from_file(const cl7::u8string &file_path, Image &image)

Loads an image from a file.

bool load_from(cl7::io::irom &rom, const cl7::u8string &rom_name, Image &image)

Loads an image from any rom.

Protected Static Functions

static bool _log_bad_format_error(const cl7::u8string &rom_name)
static bool _log_bad_header_error(const cl7::u8string &rom_name)

Private Functions

virtual bool _load_from(cl7::io::irom &rom, const cl7::u8string &rom_name, Image &image) = 0

Loads an image from any rom.

struct ImageProcessor
#include <ImageProcessor.h>

Subclassed by xl7::graphics::images::ImageConverter, xl7::graphics::images::ImageResizer

Public Static Functions

static void pack_color(const Color &color, PixelFormat pixel_format, ChannelOrder channel_order, cl7::byte_span packed_data)

Transforms the given color into the specified pixel format and channel order. The receiving data buffer is required to have at least the corresponding byte size.

static Color unpack_color(cl7::byte_view packed_data, PixelFormat pixel_format, ChannelOrder channel_order)

Extracts a color that is in the specified pixel format and channel order. The source data buffer is required to have at least the corresponding byte size.

static void _pack_color(const Color &color, const PixelBitKit &pbk, cl7::byte_span packed_data)

Transforms the given color into the specified pixel format and channel order. The receiving data buffer is required to have at least the corresponding byte size.

static Color _unpack_color(cl7::byte_view packed_data, const PixelBitKit &pbk)

Extracts a color that is in the specified pixel format and channel order. The source data buffer is required to have at least the corresponding byte size.

struct ImageResizer : public xl7::graphics::images::ImageProcessor
#include <ImageResizer.h>

Public Static Functions

static Image resize_image(const Image &source_image, unsigned width, unsigned height, unsigned depth, ResamplingMethod resampling_method)

Resizes an image. Pixel format and channel order do not change.

static Image create_mipmap(const Image &source_image, ResamplingMethod resampling_method = ResamplingMethod::LinearInterpolation)

Creates a mipmap from the specified image.

class ImageStack
#include <ImageStack.h>

Public Functions

ImageStack()
ImageStack(const Image::Desc &desc)
ImageStack(const Image &image)
inline const Image::Desc &get_image_desc() const

Returns the descriptor of the images.

inline PixelFormat get_pixel_format() const

Returns the pixel format.

inline ChannelOrder get_channel_order() const

Returns the channel order.

inline unsigned get_image_width() const

Returns the respective width of the images, in pixels.

inline unsigned get_image_height() const

Returns the respective height of the images, in pixels.

inline unsigned get_image_depth() const

Returns the respective depth of the images, in pixels (if 3D images, otherwise trivially 1).

unsigned get_image_count() const

Returns the number of contained images.

inline const cl7::byte_vector &get_data() const

Returns the consecutive data of the contained images.

bool init(const Image::Desc &desc)

(Re)initializes the image stack.

bool init(const Image &image)

(Re)initializes the image stack.

bool add_image(const Image &image)

Adds the specified image to this image stack by copying its data.

Private Members

Image::Desc _desc

The descriptor of the images.

cl7::byte_vector _data

The consecutive data of the contained images.

class IMeshFactory
#include <IMeshFactory.h>

Subclassed by xl7::graphics::IResourceFactory

Public Functions

virtual ~IMeshFactory() = default
virtual xl7::graphics::meshes::VertexBuffer *create_vertex_buffer(const resources::Resource::CreateParams<xl7::graphics::meshes::VertexBuffer::Desc> &params) = 0
virtual xl7::graphics::meshes::IndexBuffer *create_index_buffer(const resources::Resource::CreateParams<xl7::graphics::meshes::IndexBuffer::Desc> &params) = 0
struct Include : public ID3DInclude

Public Functions

inline Include(const cl7::u8string &path)
__declspec (nothrow) HRESULT __stdcall Open(D3D_INCLUDE_TYPE include_type

Public Members

cl7::u8string _root_directory
std::unordered_map<const void*, ParentEntry> _parent_entries
const char *filename
const char const void * parent_data
const char const void const void ** data_out
class IndexBuffer : public xl7::graphics::meshes::MeshBuffer
#include <IndexBuffer.h>

Subclassed by xl7::graphics::impl::direct3d11::meshes::IndexBufferImpl, xl7::graphics::impl::direct3d9::meshes::IndexBufferImpl

Public Functions

XL7_DERIVE_RESOURCE_ID(MeshBuffer)
IndexBuffer() = delete
IndexBuffer(const IndexBuffer&) = delete
IndexBuffer &operator=(const IndexBuffer&) = delete
IndexBuffer(IndexBuffer&&) = delete
IndexBuffer &operator=(IndexBuffer&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline const Desc &get_desc() const

Returns the descriptor of the index buffer.

Protected Functions

IndexBuffer(const CreateParams<Desc> &params)
~IndexBuffer() override = default

Private Members

const Desc _desc

The descriptor of the index buffer.

class IndexBufferImpl : public xl7::graphics::meshes::IndexBuffer
#include <IndexBufferImpl.h>

Public Functions

IndexBufferImpl() = delete
IndexBufferImpl(const IndexBufferImpl&) = delete
IndexBufferImpl &operator=(const IndexBufferImpl&) = delete
IndexBufferImpl(IndexBufferImpl&&) = delete
IndexBufferImpl &operator=(IndexBufferImpl&&) = delete
inline DXGI_FORMAT get_dxgi_format() const
inline ID3D11Buffer *get_raw_d3d_index_buffer() const

Returns the Direct3D 11 index buffer interface.

Protected Functions

IndexBufferImpl(const CreateParams<Desc> &params)
~IndexBufferImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _acquire_impl(const resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

virtual bool _update_impl(const resources::DataProvider &data_provider, bool discard, bool no_overwrite) override

Updates the contents of this index buffer (unless it is immutable). The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

Updates the contents of this vertex buffer (unless it is immutable). The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

Private Members

const DXGI_FORMAT _dxgi_format
wrl::ComPtr<ID3D11Buffer> _d3d_index_buffer

The Direct3D 11 index buffer interface.

class IndexBufferImpl : public xl7::graphics::meshes::IndexBuffer
#include <IndexBufferImpl.h>

Public Functions

IndexBufferImpl() = delete
IndexBufferImpl(const IndexBufferImpl&) = delete
IndexBufferImpl &operator=(const IndexBufferImpl&) = delete
IndexBufferImpl(IndexBufferImpl&&) = delete
IndexBufferImpl &operator=(IndexBufferImpl&&) = delete
inline IDirect3DIndexBuffer9 *get_raw_d3d_index_buffer() const

Returns the Direct3D 9 index buffer interface.

Protected Functions

IndexBufferImpl(const CreateParams<Desc> &params)
~IndexBufferImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _acquire_impl(const resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

virtual bool _update_impl(const resources::DataProvider &data_provider, bool discard, bool no_overwrite) override

Updates the contents of this index buffer (unless it is immutable). The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

Updates the contents of this vertex buffer (unless it is immutable). The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

Private Members

const D3DFORMAT _d3d_format
wrl::ComPtr<IDirect3DIndexBuffer9> _d3d_index_buffer

The Direct3D 9 index buffer interface.

template<class TIndex>
class IndexDataProvider : public xl7::resources::DefaultDataProvider

Public Functions

inline IndexDataProvider(std::span<const TIndex> data, size_t offset = 0)
~IndexDataProvider() override = default
class InputAssemblerStage : public xl7::graphics::pipeline::AbstractStage

Public Static Attributes

static constexpr unsigned MAX_VERTEX_STREAMS = 8

The maximum number of concurrent vertex streams (ignoring hardware/driver capabilities).

Private Functions

XL7_GRAPHICS_PIPELINE_STATE_ARRAY_DEFAULT0(vertex_buffer_id, MAX_VERTEX_STREAMS, meshes::VertexBuffer::ID, meshes::VertexBuffer::ID(), DIRTY_VERTEX_BUFFER_FLAG_BASE)
XL7_GRAPHICS_PIPELINE_SINGLE_STATE(index_buffer_id, meshes::IndexBuffer::ID, meshes::IndexBuffer::ID(), DIRTY_INDEX_BUFFER_FLAG)
XL7_GRAPHICS_PIPELINE_SINGLE_STATE(topology, meshes::Topology, meshes::Topology::Undefined, DIRTY_TOPOLOGY_FLAG)
inline meshes::Topology get_topology(meshes::Topology default_topology = meshes::Topology::Undefined) const

Private Static Attributes

static constexpr unsigned DIRTY_VERTEX_BUFFER_FLAG_BASE = 0x1
static constexpr unsigned DIRTY_VERTEX_BUFFER_FLAG_MASK = ((DIRTY_VERTEX_BUFFER_FLAG_BASE << MAX_VERTEX_STREAMS) - 1) & ~(DIRTY_VERTEX_BUFFER_FLAG_BASE - 1)
static constexpr unsigned DIRTY_INDEX_BUFFER_FLAG = 0x2 << (MAX_VERTEX_STREAMS - 1)
static constexpr unsigned DIRTY_TOPOLOGY_FLAG = 0x4 << (MAX_VERTEX_STREAMS - 1)
class IResourceFactory : public xl7::graphics::surfaces::ISurfaceFactory, public xl7::graphics::textures::ITextureFactory, public xl7::graphics::meshes::IMeshFactory, public xl7::graphics::shaders::IShaderFactory, public xl7::graphics::states::IStateFactory
#include <IResourceFactory.h>

Subclassed by xl7::graphics::impl::direct3d11::ResourceFactoryImpl, xl7::graphics::impl::direct3d9::ResourceFactoryImpl

Public Functions

~IResourceFactory() override = default
class irom
#include <irom.h>

Subclassed by cl7::io::ifile

Public Functions

virtual ~irom() = default
virtual bool is_good() const = 0

Checks whether the file is “open” and can be used.

virtual bool is_eof() const = 0

Checks whether the current byte position exceeds the size of the file.

virtual size_t get_size() const = 0

Returns the size of the file, in bytes.

virtual size_t get_position() const = 0

Returns the current byte position within the file (relative to the beginning).

virtual size_t set_position(size_t position) = 0

(Re)sets the current byte position within the file (relative to the beginning). Returns the new/current byte position.

virtual size_t seek(ptrdiff_t relative, seek_mode seek_mode = seek_mode::current) = 0

(Re)sets the current byte position within the file by moving it by the specified bytes relative to the file’s beginning, end, or current position, as specified. Returns the new/current byte position.

virtual size_t read(cl7::byte_span buffer) = 0

Reads data from the file (at the current position) into the specified buffer and returns the number of bytes transferred.

virtual size_t read(std::byte &byte) = 0

Reads a single byte from the file (at the current position) and returns the number of bytes transferred (i.e. 0 or 1).

virtual size_t peek(std::byte &byte) = 0

“Peeks” a single byte from the file (at the current position) without extracting it. Returns the number of bytes that would have been extracted if actually read (i.e. 0 or 1).

class IShaderFactory
#include <IShaderFactory.h>

Subclassed by xl7::graphics::IResourceFactory

Public Functions

virtual ~IShaderFactory() = default
virtual xl7::graphics::shaders::ConstantBuffer *create_constant_buffer(const resources::Resource::CreateParams<xl7::graphics::shaders::ConstantBuffer::Desc> &params) = 0
virtual xl7::graphics::shaders::VertexShader *create_vertex_shader(const resources::Resource::CreateParams<xl7::graphics::shaders::VertexShader::Desc> &params) = 0
virtual xl7::graphics::shaders::PixelShader *create_pixel_shader(const resources::Resource::CreateParams<xl7::graphics::shaders::PixelShader::Desc> &params) = 0
class IStateFactory
#include <IStateFactory.h>

Subclassed by xl7::graphics::IResourceFactory

Public Functions

virtual ~IStateFactory() = default
virtual xl7::graphics::states::SamplerState *create_sampler_state(const resources::Resource::CreateParams<xl7::graphics::states::SamplerState::Desc> &params) = 0
virtual xl7::graphics::states::RasterizerState *create_rasterizer_state(const resources::Resource::CreateParams<xl7::graphics::states::RasterizerState::Desc> &params) = 0
virtual xl7::graphics::states::DepthStencilState *create_depth_stencil_state(const resources::Resource::CreateParams<xl7::graphics::states::DepthStencilState::Desc> &params) = 0
virtual xl7::graphics::states::BlendState *create_blend_state(const resources::Resource::CreateParams<xl7::graphics::states::BlendState::Desc> &params) = 0
class ISurfaceFactory
#include <ISurfaceFactory.h>

Subclassed by xl7::graphics::IResourceFactory

Public Functions

virtual ~ISurfaceFactory() = default
class ITextureFactory
#include <ITextureFactory.h>

Subclassed by xl7::graphics::IResourceFactory

Public Functions

virtual ~ITextureFactory() = default
virtual xl7::graphics::textures::Texture2D *create_texture_2d(const resources::Resource::CreateParams<xl7::graphics::textures::Texture2D::Desc> &params) = 0
virtual xl7::graphics::textures::Texture3D *create_texture_3d(const resources::Resource::CreateParams<xl7::graphics::textures::Texture3D::Desc> &params) = 0
virtual xl7::graphics::textures::Texture2DArray *create_texture_2d_array(const resources::Resource::CreateParams<xl7::graphics::textures::Texture2DArray::Desc> &params) = 0
virtual xl7::graphics::textures::Cubemap *create_cubemap(const resources::Resource::CreateParams<xl7::graphics::textures::Cubemap::Desc> &params) = 0
class Json
#include <Json.h>

Public Types

enum class Type

Values:

enumerator Null
enumerator Object
enumerator Array
enumerator String
enumerator Decimal
enumerator Integer
enumerator Unsigned
enumerator Boolean

Public Functions

Json() = default
Json(object_t object)
Json(array_t array)
Json(string_t string)
Json(std::basic_string_view<string_t::value_type> string)
Json(const string_t::value_type *string)
explicit Json(float number)
explicit Json(double number)
explicit Json(long double number)
explicit Json(signed number)
explicit Json(signed long number)
explicit Json(signed long long number)
explicit Json(unsigned number)
explicit Json(unsigned long number)
explicit Json(unsigned long long number)
explicit Json(boolean_t boolean)
explicit Json(Type type)
inline Type get_type() const noexcept
inline bool is_null() const noexcept
inline bool is_object() const noexcept
inline bool is_array() const noexcept
inline bool is_string() const noexcept
inline bool is_decimal() const noexcept
inline bool is_integer() const noexcept
inline bool is_unsigned() const noexcept
inline bool is_number() const noexcept
inline bool is_boolean() const noexcept
inline bool is_true() const noexcept
inline bool is_false() const noexcept
inline bool is_primitive() const noexcept
inline bool is_structured() const noexcept
const object_t &as_object() const
object_t &as_object()
const array_t &as_array() const
array_t &as_array()
const string_t &as_string() const
string_t &as_string()
decimal_t as_decimal() const
integer_t as_integer() const
unsigned_t as_unsigned() const
template<typename Tdecimal = float>
inline Tdecimal as_decimal() const
template<typename Tinteger = signed>
inline Tinteger as_integer() const
template<typename Tunsigned = unsigned>
inline Tunsigned as_unsigned() const
boolean_t as_boolean() const
void set_null()
void set_object(object_t object)
void set_array(array_t array)
void set_string(string_t string)
void set_string(std::basic_string_view<string_t::value_type> string)
void set_string(const string_t::value_type *string)
template<typename Tdecimal>
inline void set_decimal(Tdecimal number)
template<typename Tinteger>
inline void set_integer(Tinteger number)
template<typename Tunsigned>
inline void set_unsigned(Tunsigned number)
void set_boolean(boolean_t boolean)
void reset_type(Type type)
string_t to_string() const

Serializes this JSON value into a compact single-line string representation.

const Json &at(size_t index) const
Json &at(size_t index)
const Json &at(cl7::u8string_view key) const
Json &at(cl7::u8string_view key)
Json &operator[](size_t index)
Json &operator[](cl7::u8string_view key)
Json &operator[](cl7::u8string &&key)

Private Types

using object_ptr_t = std::unique_ptr<object_t>
using array_ptr_t = std::unique_ptr<array_t>

Private Functions

decimal_t _as_decimal() const
integer_t _as_integer() const
unsigned_t _as_unsigned() const
void _set_decimal(decimal_t number)
void _set_integer(integer_t number)
void _set_unsigned(unsigned_t number)
class JsonWriter
#include <JsonWriter.h>

Public Static Functions

static cl7::u8string to_string(const Json &json, const Format &format = DEFAULT_FORMAT)

Public Static Attributes

static constexpr Format DEFAULT_MULTI_LINE_FORMAT   = {Format::Style::MultiLine, {}, {.indentation=Format::MultiLineOptions::Indentation::Spaces4, .line_ending=Format::MultiLineOptions::LineEnding::LF, .add_trailing_commas=false, .add_empty_line=false}, false, false}
static constexpr Format DEFAULT_PRETTY_PRINT_FORMAT   = {Format::Style::MultiLine, {}, {.indentation=Format::MultiLineOptions::Indentation::Spaces4, .line_ending=Format::MultiLineOptions::LineEnding::LF, .add_trailing_commas=true, .add_empty_line=true}, false, false}
static constexpr Format DEFAULT_SINGLE_LINE_FORMAT   = {Format::Style::SingleLine, {.compact=false}, {}, false, false}
static constexpr Format DEFAULT_COMPACT_FORMAT   = {Format::Style::SingleLine, {.compact=true}, {}, false, false}
static constexpr Format DEFAULT_FORMAT = DEFAULT_PRETTY_PRINT_FORMAT
struct less
#include <Vector2.h>

Public Functions

inline bool operator()(const ml7::Vector2 &a, const ml7::Vector2 &b) const
struct less
#include <Vector3.h>

Public Functions

inline bool operator()(const ml7::Vector3 &a, const ml7::Vector3 &b) const
struct less
#include <Vector4.h>

Public Functions

inline bool operator()(const ml7::Vector4 &a, const ml7::Vector4 &b) const
class Lexer
#include <Lexer.h>

Subclassed by dl7::syntax::GenericLexer

Public Types

enum class WhitespaceHandling

Values:

enumerator Discard
enumerator Preserve

Public Functions

Lexer() = delete
Lexer(Options options)

Explicit constructor.

Lexer(const Lexer&) = delete
Lexer &operator=(const Lexer&) = delete
Lexer(Lexer&&) = delete
Lexer &operator=(Lexer&&) = delete
virtual ~Lexer() = default
void init(cl7::u8string_view source)

Initializes this lexer with the specified source text and resets all internal data, especially the current cursor position.

Token next()

Performs a lexical analysis of the source text at the current cursor position and returns the next token after the cursor has been moved forward.

std::vector<Token> tokenize(cl7::u8string_view source)

Initializes this lexer with the specified source text, performs a lexical analysis of it, and returns a “list” of recognized tokens.

inline const Options &get_options() const

Returns the options.

inline cl7::u8string_view get_source() const

Returns the source text.

inline cl7::u8string_view get_remainder() const

Returns the rest of the source text that has not yet been analyzed, depending on the current cursor position.

inline const SourceLocation &get_source_location() const

Returns the current source location of the next character/token to be recognized.

Private Functions

virtual std::pair<SymbolID, size_t> _recognize(cl7::u8string_view source) = 0

Performs a lexical analysis of the specified source text and returns the symbol ID and the lexeme of the first/next token at the very beginning.

size_t _skip_whitespace()

Skips any whitespace characters and moves the cursor position forward if necessary. Returns the number of whitespace characters skipped.

void _advance(size_t count)

Advances the current cursor position by the specified number of characters.

Private Members

const Options _options

The options.

cl7::u8string_view _source

The source text.

SourceLocation _source_location

The current source location of the next character/token to be recognized.

struct ListenerEntry

Public Functions

auto operator<=>(const ListenerEntry &rhs) const

Public Members

signed priority
unsigned consecutive_number
reporting::IListener *listener
struct LiteralSymbol : public dl7::syntax::TerminalSymbol
#include <TerminalSymbol.h>

Public Functions

LiteralSymbol(SymbolID id, cl7::u8string_view literal)
~LiteralSymbol() override = default
inline virtual bool is_literal() const override
virtual size_t try_match_prefix(cl7::u8string_view source) const override

Public Members

cl7::u8string literal

The static string literal of the symbol.

struct LogEntry
#include <LogEntry.h>

Attention! If you want to store the log message for later access, you should convert the string_view to a string managed by you. This should actually go without saying, but in this context “entry” (of “LogEntry”) could be a bit misleading, because it sounds so much like “storing”, so I’ll mention it explicitly here.

Public Members

cl7::u8string_view message

The log message itself (as a string_view not suitable for storing for later use).

LogType type

The log type (error, warning, etc.).

const char *file_path = nullptr

The (relative) path to the file the log was generated in.

unsigned line_number = 0

The line number the log was generated at.

const char *function_name = nullptr

The function name the log was generated from.

class Logger
#include <Logger.h>

Public Types

using LogHandler = AbstractLogHandler
using LogHandlerPtr = std::shared_ptr<LogHandler>

Public Functions

Logger() = default
Logger(const Logger&) = delete
Logger &operator=(const Logger&) = delete
Logger(Logger&&) = delete
Logger &operator=(Logger&&) = delete
~Logger() noexcept = default
Logger &add_log_handler(const LogHandlerPtr &log_handler)

(Re-)adds the specified log handler.

Logger &remove_log_handler(const LogHandlerPtr &log_handler)

Removes the specified log handler. Does nothing if not found.

Logger &clear_log_handlers()

Removes all log handlers.

Logger &log(const LogEntry &log_entry)

Logs the specified entry invoking the registered handlers.

Private Functions

std::vector<LogHandlerPtr>::iterator _find_log_handler(const LogHandlerPtr &log_handler)

Searches for the specified log handler and returns a matching iterator (if found).

Private Members

std::vector<LogHandlerPtr> _log_handlers

A “list” of log handlers.

struct Lookup

Public Functions

inline Lookup(int dummy, size_t index)
inline Lookup(KeyView key)

Public Members

size_t index

Public Static Attributes

static constexpr size_t invalid_index = -1
static constexpr size_t max_index = invalid_index - 1
static KeyView key = {}
struct LookupCompare

Public Functions

inline LookupCompare(const vector_type *vector, Compare comp)
inline bool operator()(const Lookup &a, const Lookup &b) const
inline bool operator()(const Lookup &a, size_t b_index) const

Public Members

const vector_type *vector
Compare comp
class MainWindow : public xl7::Component<MainWindow>
#include <MainWindow.h>

Public Types

enum class DisplayMode

Values:

enumerator Unknown
enumerator Fullscreen
enumerator Borderless
enumerator Windowed

Public Functions

MainWindow(const MainWindow&) = delete
MainWindow &operator=(const MainWindow&) = delete
MainWindow(MainWindow&&) = delete
MainWindow &operator=(MainWindow&&) = delete
inline HWND get_handle() const

Returns the handle of the window.

inline DisplayMode get_display_mode() const

Returns the display mode.

inline unsigned get_width() const

Returns the window width, in pixels.

inline unsigned get_height() const

Returns the window height, in pixels.

inline const cl7::u8string &get_title() const

Returns the title of the window.

inline HICON get_icon_handle() const

Returns the handle of the icon (or NULL).

inline HICON get_small_icon_handle() const

Returns the handle of the small icon (or NULL).

inline bool is_active() const

Returns the flag indicating whether the window is currently active.

bool show_window()

Shows the window (makes the window visible). The function returns true, if the window was visible before.

bool hide_window()

Hides the window (makes the window unvisible). The function returns true, if the window was visible before.

bool close()

Closes the window (and destroys it).

Public Static Functions

static std::pair<bool, int> process_window_messages()

Processes incoming window messages. Returns a flag indicating a request to terminate the application (WM_QUIT message) and, if so, the exit code (0 otherwise).

Private Functions

MainWindow()

Default constructor.

~MainWindow() override = default

Destructor.

virtual bool _init() override

Initializes the component.

virtual bool _shutdown() override

De-initializes the component.

bool _register_window_class()

Registers the window class.

bool _create_window()

Creates the window.

bool _destroy_window()

Destroys the window.

Private Members

HWND _handle = nullptr

The handle of the window.

DisplayMode _display_mode = DisplayMode::Unknown

The display mode (fullscreen, borderless, or windowed).

unsigned _width = 0

The window width, in pixels.

unsigned _height = 0

The window height, in pixels.

cl7::u8string _title

The title of the window.

HICON _icon_handle = nullptr

The handle of the icon (or NULL).

HICON _small_icon_handle = nullptr

The handle of the small icon (or NULL).

bool _active = false

The flag indicating whether the window is currently active.

Private Static Functions

static bool _unregister_window_class()

Unregisters the window class.

static LRESULT CALLBACK wnd_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)

The callback function processing incoming window messages.

Friends

friend class cl7::creational::Singleton< MainWindow >
struct Matrix2x2
#include <Matrix2x2.h>

Public Functions

inline constexpr Matrix2x2() noexcept

Default constructor. Initializes an identity matrix representing a neutral transformation.

inline constexpr Matrix2x2(float _11, float _12, float _21, float _22) noexcept

Explicit constructor with parameters for each element.

void swap(Matrix2x2 &other) noexcept

Swap operation.

inline bool is_invertible() const

Tells whether this matrix is invertible (i.e., whether its determinant is non-zero).

inline float determinant() const

Returns the determinant of the matrix.

inline Matrix2x2 transposed() const

Returns a copy of this matrix transposed.

Matrix2x2 inverted() const

Returns a copy of this matrix inverted (if possible).

inline Vector2 get_row(unsigned i) const

Returns the i-th (0-indexed) row vector of this matrix.

inline Vector2 get_column(unsigned j) const

Returns the j-th (0-indexed) column vector of this matrix.

inline void to_axes(ml7::Vector2 &x, ml7::Vector2 &y) const

Extracts the basis vectors that define the transformed coordinate system (i.e., the column vectors of the matrix).

bool decompose(ml7::Vector2 &scaling, float &angle) const

Tries to extract the scaling vector and the counter-clockwise rotation angle (in the range [-pi;+pi]) this matrix is composed of. This only works if the matrix actually consists of rotations and (positive) scalings in the “common” order (no shears, negative scalings, etc.).

inline constexpr Vector2 transform(const Vector2 &v) const

Returns a copy of the given (column) vector transformed by this matrix.

Vector2 transform_inverted(const Vector2 &v) const

Returns a copy of the given (column) vector transformed by this matrix inverted (if possible).

inline Matrix2x2 &transpose()

Transposes this matrix.

inline Matrix2x2 &invert()

Inverts this matrix (if possible).

inline Matrix2x2 &set_row(unsigned i, Vector2 v)

Sets the i-th (0-indexed) row vector of this matrix.

inline Matrix2x2 &set_column(unsigned j, Vector2 v)

Sets the j-th (0-indexed) column vector of this matrix.

inline bool operator==(const Matrix2x2 &m) const
inline bool operator!=(const Matrix2x2 &m) const
inline constexpr Matrix2x2 operator+() const

Returns a copy of this matrix unmodified.

inline constexpr Matrix2x2 operator-() const

Returns a copy of this matrix with the signs of the elements flipped.

inline constexpr Matrix2x2 operator+(const Matrix2x2 &m) const

Returns the (element-wise) matrix sum of two matrices.

inline constexpr Matrix2x2 operator-(const Matrix2x2 &m) const

Returns the (element-wise) matrix difference of two matrices.

inline constexpr Matrix2x2 operator*(float s) const

Returns a copy of this matrix “scaled” by the specified factor (scalar multiplication).

inline constexpr Matrix2x2 operator/(float s) const

Returns a copy of this matrix inversely “scaled” by the specified factor (scalar division).

inline constexpr Matrix2x2 operator*(const Matrix2x2 &m) const

Returns the matrix product of two matrices (matrix multiplication).

inline constexpr Vector2 operator*(const Vector2 &v) const

Returns a copy of the given (column) vector transformed by this matrix.

inline constexpr Matrix2x2 &operator+=(const Matrix2x2 &m)

Adds the given matrix to this one, resulting in the (element-wise) matrix sum.

inline constexpr Matrix2x2 &operator-=(const Matrix2x2 &m)

Subtracts the given matrix from this one, resulting in the (element-wise) matrix difference.

inline constexpr Matrix2x2 &operator*=(float s)

“Scales” this matrix by the specified factor (scalar multiplication).

inline constexpr Matrix2x2 &operator/=(float s)

Inversely “scales” this matrix by the specified factor (scalar division).

inline const float *operator[](unsigned i) const
inline float *operator[](unsigned i)

Public Members

float _11

Element in the 1st row and 1st column.

float _12

Element in the 1st row and 2nd column.

float _21

Element in the 2nd row and 1st column.

float _22

Element in the 2nd row and 2nd column.

float a

Element in the 1st row and 1st column.

float b

Element in the 1st row and 2nd column.

float c

Element in the 2nd row and 1st column.

float d

Element in the 2nd row and 2nd column.

float data[4]

Array of the elements.

float m[2][2]

2D array of the elements.

union ml7::Matrix2x2

Public Static Functions

static inline constexpr Matrix2x2 from_axes(const ml7::Vector2 &x, const ml7::Vector2 &y)

Initializes a transformation matrix from the specified basis vectors that define the transformed coordinate system (as the column vectors of the matrix).

static inline constexpr Matrix2x2 scaling(float s)

Initializes a scaling matrix with scaling factor s.

static inline constexpr Matrix2x2 scaling(const ml7::Vector2 &s)

Initializes a scaling matrix with scaling vector s.

static inline Matrix2x2 rotation(float angle)

Initializes a rotation matrix representing a counter-clockwise rotation by a certain angle (in radians).

static inline Matrix2x2 compose(float scaling, float angle)

Initializes a transformation matrix from the specified scaling factor and a counter-clockwise rotation angle (in radians).

static Matrix2x2 compose(const ml7::Vector2 &scaling, float angle)

Initializes a transformation matrix from the specified scaling vector and a counter-clockwise rotation angle (in radians).

Public Static Attributes

static const Matrix2x2 ZERO = {0.0f, 0.0f, 0.0f, 0.0f}
static const Matrix2x2 IDENTITY = {1.0f, 0.0f, 0.0f, 1.0f}
struct Matrix2x3
#include <Matrix2x3.h>

Public Functions

inline constexpr Matrix2x3() noexcept

Default constructor. Initializes an identity matrix representing a neutral transformation.

inline constexpr Matrix2x3(float _11, float _12, float _13, float _21, float _22, float _23) noexcept

Explicit constructor with parameters for each element.

inline explicit constexpr Matrix2x3(const Matrix2x2 &m2x2) noexcept

Explicit constructor from a 2x2 matrix.

inline constexpr Matrix2x3(const Matrix2x2 &m2x2, const ml7::Vector2 &translation) noexcept

Explicit constructor from a 2x2 matrix and a translation vector.

void swap(Matrix2x3 &other) noexcept

Swap operation.

inline bool is_invertible() const

Tells whether this matrix is invertible (i.e., whether the determinant of its 2x2 part is non-zero).

inline float determinant() const

Returns the determinant of the 2x2 part of the matrix.

Matrix2x3 inverted() const

Returns a copy of this matrix inverted (if possible).

inline Vector2 get_column(unsigned j) const

Returns the j-th (0-indexed) column vector of this matrix.

inline void to_axes(ml7::Vector2 &x, ml7::Vector2 &y) const

Extracts the basis vectors that define the transformed coordinate system (i.e., the column vectors of the matrix).

inline void to_axes(ml7::Vector2 &x, ml7::Vector2 &y, ml7::Vector2 &origin) const

Extracts the basis vectors and origin/translation vector that define the transformed coordinate system (i.e., the column vectors of the matrix).

inline Matrix2x2 to_matrix2x2() const

Returns the 2x2 part of this matrix.

inline void decompose(ml7::Matrix2x2 &m2x2, ml7::Vector2 &translation) const

Decomposes this matrix into a 2x2 matrix and a translation vector.

bool decompose(ml7::Vector2 &scaling, float &angle, ml7::Vector2 &translation) const

Tries to extract the scaling vector, the counter-clockwise rotation angle (in the range [-pi;+pi]), and the translation vector this matrix is composed of. This only works if the matrix actually consists of translations, rotations and (positive) scalings in the “common” order (no shears, negative scalings, etc.).

inline constexpr Vector2 transform(const Vector2 &v) const

Returns a copy of the given (column) vector transformed by this matrix. Used to transform position vectors rather than direction vectors.

inline constexpr Vector2 transform2x2(const Vector2 &v) const

Returns a copy of the given (column) vector transformed by the 2x2 part of this matrix. Used to transform direction vectors rather than position vectors.

Vector2 transform_inverted(const Vector2 &v) const

Returns a copy of the given (column) vector transformed by this matrix inverted (if possible). Used to transform position vectors rather than direction vectors.

Vector2 transform2x2_inverted(const Vector2 &v) const

Returns a copy of the given (column) vector transformed by the 2x2 part of this matrix inverted (if possible). Used to transform direction vectors rather than position vectors.

inline Matrix2x3 &invert()

Inverts this matrix (if possible).

inline Matrix2x3 &set_column(unsigned j, Vector2 v)

Sets the j-th (0-indexed) column vector of this matrix.

inline bool operator==(const Matrix2x3 &m) const
inline bool operator!=(const Matrix2x3 &m) const
inline constexpr Matrix2x3 operator+() const

Returns a copy of this matrix unmodified.

inline constexpr Matrix2x3 operator-() const

Returns a copy of this matrix with the signs of the elements flipped.

inline constexpr Matrix2x3 operator+(const Matrix2x3 &m) const

Returns the (element-wise) matrix sum of two matrices.

inline constexpr Matrix2x3 operator-(const Matrix2x3 &m) const

Returns the (element-wise) matrix difference of two matrices.

inline constexpr Matrix2x3 operator*(float s) const

Returns a copy of this matrix “scaled” by the specified factor (scalar multiplication).

inline constexpr Matrix2x3 operator/(float s) const

Returns a copy of this matrix inversely “scaled” by the specified factor (scalar division).

inline constexpr Matrix2x3 operator*(const Matrix2x3 &m) const

Returns the matrix product of two matrices (matrix multiplication).

inline constexpr Vector2 operator*(const Vector2 &v) const

Returns a copy of the given (column vector) transformed by this matrix.

inline constexpr Matrix2x3 &operator+=(const Matrix2x3 &m)

Adds the given matrix to this one, resulting in the (element-wise) matrix sum.

inline constexpr Matrix2x3 &operator-=(const Matrix2x3 &m)

Subtracts the given matrix from this one, resulting in the (element-wise) matrix difference.

inline constexpr Matrix2x3 &operator*=(float s)

“Scales” this matrix by the specified factor (scalar multiplication).

inline constexpr Matrix2x3 &operator/=(float s)

Inversely “scales” this matrix by the specified factor (scalar division).

inline const float *operator[](unsigned i) const
inline float *operator[](unsigned i)

Public Members

float _11

Element in the 1st row and 1st column.

float _12

Element in the 1st row and 2nd column.

float _13

Element in the 1st row and 3rd column.

float _21

Element in the 2nd row and 1st column.

float _22

Element in the 2nd row and 2nd column.

float _23

Element in the 2nd row and 3rd column.

float a

Element in the 1st row and 1st column.

float b

Element in the 1st row and 2nd column.

float c

Element in the 1nd row and 3rd column.

float d

Element in the 2nd row and 1st column.

float e

Element in the 2nd row and 2nd column.

float f

Element in the 2nd row and 3rd column.

float data[6]

Array of the elements.

float m[2][3]

2D array of the elements.

union ml7::Matrix2x3

Public Static Functions

static inline constexpr Matrix2x3 from_axes(const ml7::Vector2 &x, const ml7::Vector2 &y)

Initializes a transformation matrix from the specified basis vectors that define the transformed coordinate system (as the column vectors of the matrix).

static inline constexpr Matrix2x3 from_axes(const ml7::Vector2 &x, const ml7::Vector2 &y, const ml7::Vector2 &origin)

Initializes a transformation matrix from the specified basis vectors and origin/translation vector that define the transformed coordinate system (as the column vectors of the matrix).

static inline constexpr Matrix2x3 scaling(float s)

Initializes a scaling matrix with scaling factor s.

static inline constexpr Matrix2x3 scaling(const ml7::Vector2 &s)

Initializes a scaling matrix with scaling vector s.

static inline Matrix2x3 rotation(float angle)

Initializes a rotation matrix representing a counter-clockwise rotation by a certain angle (in radians).

static inline Matrix2x3 translation(const ml7::Vector2 &translation)

Initializes a translation matrix from the specified translation vector.

static inline Matrix2x3 compose(float scaling, float angle, const ml7::Vector2 &translation)

Initializes a transformation matrix from the specified scaling factor, a counter-clockwise rotation angle (in radians), and a translation vector.

static Matrix2x3 compose(const ml7::Vector2 &scaling, float angle, const ml7::Vector2 &translation)

Initializes a transformation matrix from the specified scaling vector, a counter-clockwise rotation angle (in radians), and a translation vector.

Public Static Attributes

static const Matrix2x3 ZERO = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}
static const Matrix2x3 IDENTITY = {1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f}
struct Matrix3x3
#include <Matrix3x3.h>

Public Functions

inline constexpr Matrix3x3() noexcept

Default constructor. Initializes an identity matrix representing a neutral transformation.

inline constexpr Matrix3x3(float _11, float _12, float _13, float _21, float _22, float _23, float _31, float _32, float _33) noexcept

Explicit constructor with parameters for each element.

void swap(Matrix3x3 &other) noexcept

Swap operation.

inline bool is_invertible() const

Tells whether this matrix is invertible (i.e., whether its determinant is non-zero).

inline float determinant() const

Returns the determinant of the matrix.

inline Matrix3x3 transposed() const

Returns a copy of this matrix transposed.

Matrix3x3 inverted() const

Returns a copy of this matrix inverted (if possible).

inline Vector3 get_row(unsigned i) const

Returns the i-th (0-indexed) row vector of this matrix.

inline Vector3 get_column(unsigned j) const

Returns the j-th (0-indexed) column vector of this matrix.

inline void to_axes(ml7::Vector3 &x, ml7::Vector3 &y, ml7::Vector3 &z) const

Extracts the basis vectors that define the transformed coordinate system (i.e., the column vectors of the matrix).

bool to_axis_angle(ml7::Vector3 &axis, float &angle) const

Tries to extract the rotation axis and the rotation angle (in the range [0;pi]) this matrix is composed of. This only works if the matrix actually consists of rotations only (no scalings, shears, etc.).

bool decompose(ml7::Vector3 &scaling, ml7::Vector3 &axis, float &angle) const

Tries to extract the scaling vector, the rotation axis, and the rotation angle (in the range [0;pi]) this matrix is composed of. This only works if the matrix actually consists of rotations and (positive) scalings in the “common” order (no shears, negative scalings, etc.).

bool is_look_lh(ml7::Vector3 &look, ml7::Vector3 &up) const

Assumes that this matrix is a view rotation matrix for a left-handed coordinate system and tries to extract the camera “look” direction and the “up” direction.

bool is_look_rh(ml7::Vector3 &look, ml7::Vector3 &up) const

Assumes that this matrix is a view rotation matrix for a right-handed coordinate system and tries to extract the camera “look” direction and the “up” direction.

inline constexpr Vector3 transform(const Vector3 &v) const

Returns a copy of the given (column) vector transformed by this matrix.

Vector3 transform_inverted(const Vector3 &v) const

Returns a copy of the given (column) vector transformed by this matrix inverted (if possible).

inline Matrix3x3 &transpose()

Transposes this matrix.

inline Matrix3x3 &invert()

Inverts this matrix (if possible).

inline Matrix3x3 &set_row(unsigned i, Vector3 v)

Sets the i-th (0-indexed) row vector of this matrix.

inline Matrix3x3 &set_column(unsigned j, Vector3 v)

Sets the j-th (0-indexed) column vector of this matrix.

inline bool operator==(const Matrix3x3 &m) const
inline bool operator!=(const Matrix3x3 &m) const
inline constexpr Matrix3x3 operator+() const

Returns a copy of this matrix unmodified.

inline constexpr Matrix3x3 operator-() const

Returns a copy of this matrix with the signs of the elements flipped.

inline constexpr Matrix3x3 operator+(const Matrix3x3 &m) const

Returns the (element-wise) matrix sum of two matrices.

inline constexpr Matrix3x3 operator-(const Matrix3x3 &m) const

Returns the (element-wise) matrix difference of two matrices.

inline constexpr Matrix3x3 operator*(float s) const

Returns a copy of this vector “scaled” by the specified factor (scalar multiplication).

inline constexpr Matrix3x3 operator/(float s) const

Returns a copy of this vector inversely “scaled” by the specified factor (scalar division).

inline constexpr Matrix3x3 operator*(const Matrix3x3 &m) const

Returns the matrix product of two matrices (matrix multiplication).

inline constexpr Vector3 operator*(const Vector3 &v) const

Returns a copy of the given (column) vector transformed by this matrix.

inline constexpr Matrix3x3 &operator+=(const Matrix3x3 &m)

Adds the given matrix to this one, resulting in the (element-wise) matrix sum.

inline constexpr Matrix3x3 &operator-=(const Matrix3x3 &m)

Subtracts the given matrix from this one, resulting in the (element-wise) matrix difference.

inline constexpr Matrix3x3 &operator*=(float s)

“Scales” this matrix by the specified factor (scalar multiplication).

inline constexpr Matrix3x3 &operator/=(float s)

Inversely scales this matrix by the specified factor (scalar division).

inline const float *operator[](unsigned i) const
inline float *operator[](unsigned i)

Public Members

float _11

Element in the 1st row and 1st column.

float _12

Element in the 1st row and 2nd column.

float _13

Element in the 1st row and 3rd column.

float _21

Element in the 2nd row and 1st column.

float _22

Element in the 2nd row and 2nd column.

float _23

Element in the 2nd row and 3rd column.

float _31

Element in the 3rd row and 1st column.

float _32

Element in the 3rd row and 2nd column.

float _33

Element in the 3rd row and 3rd column.

float a

Element in the 1st row and 1st column.

float b

Element in the 1st row and 2nd column.

float c

Element in the 1st row and 3rd column.

float d

Element in the 2nd row and 1st column.

float e

Element in the 2nd row and 2nd column.

float f

Element in the 2nd row and 3rd column.

float g

Element in the 3rd row and 1st column.

float h

Element in the 3rd row and 2nd column.

float i

Element in the 3rd row and 3rd column.

float data[9]

Array of the elements.

float m[3][3]

2D array of the elements.

union ml7::Matrix3x3

Public Static Functions

static inline constexpr Matrix3x3 from_axes(const ml7::Vector3 &x, const ml7::Vector3 &y, const ml7::Vector3 &z)

Initializes a transformation matrix from the specified basis vectors that define the transformed coordinate system (as the column vectors of the matrix).

static inline constexpr Matrix3x3 scaling(float s)

Initializes a scaling matrix with scaling factor s.

static inline constexpr Matrix3x3 scaling(const ml7::Vector3 &s)

Initializes a scaling matrix with scaling vector s.

static inline Matrix3x3 rotx(float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around the x-axis.

static inline Matrix3x3 rotx(float sin, float cos)

Initializes a rotation matrix representing a rotation around the x-axis based on ready-made sine and cosine values.

static inline Matrix3x3 roty(float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around the y-axis.

static inline Matrix3x3 roty(float sin, float cos)

Initializes a rotation matrix representing a rotation around the y-axis based on ready-made sine and cosine values.

static inline Matrix3x3 rotz(float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around the z-axis.

static inline Matrix3x3 rotz(float sin, float cos)

Initializes a rotation matrix representing a rotation around the z-axis based on ready-made sine and cosine values.

static inline Matrix3x3 rotation(const ml7::Vector3 &axis_angle)

Initializes a rotation matrix representing a rotation around the specified axis, with an angle equal to the magnitude of the specified vector (in radians).

static inline Matrix3x3 rotation(const ml7::Vector3 &axis, float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around the specified axis.

static Matrix3x3 rotation_normalized(const ml7::Vector3 &unit_axis, float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around an axis specified as a normalized unit vector.

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around an axis specified as a unit vector.

static inline Matrix3x3 compose(float scaling, const ml7::Vector3 &axis, float angle)

Initializes a transformation matrix from the specified scaling factor, a rotation axis, and a rotation angle (in radians).

static Matrix3x3 compose(const ml7::Vector3 &scaling, const ml7::Vector3 &axis, float angle)

Initializes a transformation matrix from the specified scaling vector, a rotation axis, and a rotation angle (in radians).

static Matrix3x3 look_lh(const Vector3 &look, const Vector3 &up)

Initializes a view rotation matrix for a left-handed coordinate system using a camera “look” direction and an “up” direction.

static Matrix3x3 look_rh(const Vector3 &look, const Vector3 &up)

Initializes a view rotation matrix for a right-handed coordinate system using a camera “look” direction and an “up” direction.

Public Static Attributes

static const Matrix3x3 ZERO = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}
static const Matrix3x3 IDENTITY = {1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f}
struct Matrix3x4
#include <Matrix3x4.h>

Public Functions

inline constexpr Matrix3x4() noexcept

Default constructor. Initializes an identity matrix representing a neutral transformation.

inline constexpr Matrix3x4(float _11, float _12, float _13, float _14, float _21, float _22, float _23, float _24, float _31, float _32, float _33, float _34) noexcept

Explicit constructor with parameters for each element.

inline explicit constexpr Matrix3x4(const Matrix3x3 &m3x3) noexcept

Explicit constructor from a 3x3 matrix.

inline constexpr Matrix3x4(const Matrix3x3 &m3x3, const ml7::Vector3 &translation) noexcept

Explicit constructor from a 3x3 matrix and a translation vector.

void swap(Matrix3x4 &other) noexcept

Swap operation.

inline bool is_invertible() const

Tells whether this matrix is invertible (i.e., whether the determinant of its 3x3 part is non-zero).

inline float determinant() const

Returns the determinant of the 3x3 part of the matrix.

Matrix3x4 inverted() const

Returns a copy of this matrix inverted (if possible).

inline Vector3 get_column(unsigned j) const

Returns the j-th (0-indexed) column vector of this matrix.

inline void to_axes(ml7::Vector3 &x, ml7::Vector3 &y, ml7::Vector3 &z) const

Extracts the basis vectors that define the transformed coordinate system (i.e., the column vectors of the 3x3 part of the matrix).

inline void to_axes(ml7::Vector3 &x, ml7::Vector3 &y, ml7::Vector3 &z, ml7::Vector3 &origin) const

Extracts the basis vectors and origin/translation vector that define the transformed coordinate system (i.e., the column vectors of the matrix).

bool to_axis_angle(ml7::Vector3 &axis, float &angle) const

Tries to extract the rotation axis and the rotation angle (in the range [0;pi]) the 3x3 part of this matrix is composed of. This only works if the 3x3 part actually consists of rotations only (no scalings, shears, etc.).

inline Matrix3x3 to_matrix3x3() const

Returns the 3x3 part of this matrix.

inline void decompose(ml7::Matrix3x3 &m3x3, ml7::Vector3 &translation) const

Decomposes this matrix into a 3x3 matrix and a translation vector.

bool decompose(ml7::Vector3 &scaling, ml7::Vector3 &axis, float &angle, ml7::Vector3 &translation) const

Tries to extract the scaling vector, the rotation axis, the rotation angle (in the range [0;pi]), and the translation vector this matrix is composed of. This only works if the matrix actually consists of translations, rotations and (positive) scalings in the “common” order (no shears, negative scalings, etc.).

bool is_look_lh(ml7::Vector3 &position, ml7::Vector3 &look, ml7::Vector3 &up) const

Assumes that this matrix is a view transformation matrix for a left-handed coordinate system and tries to extract the camera position, the camera “look” direction, and the “up” direction.

bool is_look_rh(ml7::Vector3 &position, ml7::Vector3 &look, ml7::Vector3 &up) const

Assumes that this matrix is a view transformation matrix for a right-handed coordinate system and tries to extract the camera position, the camera “look” direction, and the “up” direction.

inline constexpr Vector3 transform(const Vector3 &v) const

Returns a copy of the given (column) vector transformed by this matrix. Used to transform position vectors rather than direction vectors.

inline constexpr Vector3 transform3x3(const Vector3 &v) const

Returns a copy of the given (column) vector transformed by the 3x3 part of this matrix. Used to transform direction vectors rather than position vectors.

Vector3 transform_inverted(const Vector3 &v) const

Returns a copy of the given (column) vector transformed by this matrix inverted (if possible). Used to transform position vectors rather than direction vectors.

Vector3 transform3x3_inverted(const Vector3 &v) const

Returns a copy of the given (column) vector transformed by the 3x3 part of this matrix inverted (if possible). Used to transform direction vectors rather than position vectors.

inline Matrix3x4 &invert()

Inverts this matrix (if possible).

inline Matrix3x4 &set_column(unsigned j, Vector3 v)

Sets the j-th (0-indexed) column vector of this matrix.

inline bool operator==(const Matrix3x4 &m) const
inline bool operator!=(const Matrix3x4 &m) const
inline constexpr Matrix3x4 operator+() const

Returns a copy of this matrix unmodified.

inline constexpr Matrix3x4 operator-() const

Returns a copy of this matrix with the signs of the elements flipped.

inline constexpr Matrix3x4 operator+(const Matrix3x4 &m) const

Returns the (element-wise) matrix sum of two matrices.

inline constexpr Matrix3x4 operator-(const Matrix3x4 &m) const

Returns the (element-wise) matrix difference of two matrices.

inline constexpr Matrix3x4 operator*(float s) const

Returns a copy of this matrix “scaled” by the specified factor (scalar multiplication).

inline constexpr Matrix3x4 operator/(float s) const

Returns a copy of this matrix inversely “scaled” by the specified factor (scalar division).

inline constexpr Matrix3x4 operator*(const Matrix3x4 &m) const

Returns the matrix product of two matrices (matrix multiplication).

inline constexpr Vector3 operator*(const Vector3 &v) const

Returns a copy of the given (column vector) transformed by this matrix.

inline constexpr Matrix3x4 &operator+=(const Matrix3x4 &m)

Adds the given matrix to this one, resulting in the (element-wise) matrix sum.

inline constexpr Matrix3x4 &operator-=(const Matrix3x4 &m)

Subtracts the given matrix from this one, resulting in the (element-wise) matrix difference.

inline constexpr Matrix3x4 &operator*=(float s)

“Scales” this matrix by the specified factor (scalar multiplication).

inline constexpr Matrix3x4 &operator/=(float s)

Inversely “scales” this matrix by the specified factor (scalar division).

inline const float *operator[](unsigned i) const
inline float *operator[](unsigned i)

Public Members

float _11

Element in the 1st row and 1st column.

float _12

Element in the 1st row and 2nd column.

float _13

Element in the 1st row and 3rd column.

float _14

Element in the 1st row and 4th column.

float _21

Element in the 2nd row and 1st column.

float _22

Element in the 2nd row and 2nd column.

float _23

Element in the 2nd row and 3rd column.

float _24

Element in the 2nd row and 4th column.

float _31

Element in the 3rd row and 1st column.

float _32

Element in the 3rd row and 2nd column.

float _33

Element in the 3rd row and 3rd column.

float _34

Element in the 3rd row and 4th column.

float data[12]

Array of the elements.

float m[3][4]

2D array of the elements.

union ml7::Matrix3x4

Public Static Functions

static inline constexpr Matrix3x4 from_axes(const ml7::Vector3 &x, const ml7::Vector3 &y, const ml7::Vector3 &z)

Initializes a transformation matrix from the specified basis vectors that define the transformed coordinate system (as the column vectors of the matrix).

static inline constexpr Matrix3x4 from_axes(const ml7::Vector3 &x, const ml7::Vector3 &y, const ml7::Vector3 &z, const ml7::Vector3 &origin)

Initializes a transformation matrix from the specified basis vectors and origin/translation vector that define the transformed coordinate system (as the column vectors of the matrix).

static inline constexpr Matrix3x4 scaling(float s)

Initializes a scaling matrix with scaling factor s.

static inline constexpr Matrix3x4 scaling(const ml7::Vector3 &s)

Initializes a scaling matrix with scaling vector s.

static inline Matrix3x4 rotx(float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around the x-axis.

static inline Matrix3x4 rotx(float sin, float cos)

Initializes a rotation matrix representing a rotation around the x-axis based on ready-made sine and cosine values.

static inline Matrix3x4 roty(float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around the y-axis.

static inline Matrix3x4 roty(float sin, float cos)

Initializes a rotation matrix representing a rotation around the y-axis based on ready-made sine and cosine values.

static inline Matrix3x4 rotz(float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around the z-axis.

static inline Matrix3x4 rotz(float sin, float cos)

Initializes a rotation matrix representing a rotation around the z-axis based on ready-made sine and cosine values.

static inline Matrix3x4 rotation(const ml7::Vector3 &axis_angle)

Initializes a rotation matrix representing a rotation around the specified axis, with an angle equal to the magnitude of the specified vector (in radians).

static inline Matrix3x4 rotation(const ml7::Vector3 &axis, float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around the specified axis.

static Matrix3x4 rotation_normalized(const ml7::Vector3 &unit_axis, float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around an axis specified as a normalized unit vector.

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around an axis specified as a unit vector.

static inline Matrix3x4 translation(const ml7::Vector3 &translation)

Initializes a translation matrix from the specified translation vector.

static inline Matrix3x4 compose(float scaling, const ml7::Vector3 &axis, float angle, const ml7::Vector3 &translation)

Initializes a transformation matrix from the specified scaling factor, a rotation axis, a rotation angle (in radians), and a translation vector.

static Matrix3x4 compose(const ml7::Vector3 &scaling, const ml7::Vector3 &axis, float angle, const ml7::Vector3 &translation)

Initializes a transformation matrix from the specified scaling vector, a rotation axis, a rotation angle (in radians), and a translation vector.

static Matrix3x4 look_at_lh(const Vector3 &position, const Vector3 &focus, const Vector3 &up)

Initializes a view transformation matrix for a left-handed coordinate system using a camera position, a focal point, and an “up” direction.

static Matrix3x4 look_at_rh(const Vector3 &position, const Vector3 &focus, const Vector3 &up)

Initializes a view transformation matrix for a right-handed coordinate system using a camera position, a focal point, and an “up” direction.

static Matrix3x4 look_to_lh(const Vector3 &position, const Vector3 &look, const Vector3 &up)

Initializes a view transformation matrix for a left-handed coordinate system using a camera position, a camera “look” direction, and an “up” direction.

static Matrix3x4 look_to_rh(const Vector3 &position, const Vector3 &look, const Vector3 &up)

Initializes a view transformation matrix for a right-handed coordinate system using a camera position, a camera “look” direction, and an “up” direction.

Public Static Attributes

static const Matrix3x4 ZERO = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}
static const Matrix3x4 IDENTITY = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f}
struct Matrix4x4
#include <Matrix4x4.h>

Public Functions

inline constexpr Matrix4x4() noexcept

Default constructor. Initializes an identity matrix representing a neutral transformation.

inline constexpr Matrix4x4(float _11, float _12, float _13, float _14, float _21, float _22, float _23, float _24, float _31, float _32, float _33, float _34, float _41, float _42, float _43, float _44) noexcept

Explicit constructor with parameters for each element.

inline explicit constexpr Matrix4x4(const Matrix3x3 &m3x3) noexcept

Explicit constructor from a 3x3 matrix.

inline constexpr Matrix4x4(const Matrix3x3 &m3x3, const ml7::Vector3 &translation) noexcept

Explicit constructor from a 3x3 matrix and a translation vector.

inline explicit constexpr Matrix4x4(const Matrix3x4 &m3x4) noexcept

Explicit constructor from a 3x4 matrix.

void swap(Matrix4x4 &other) noexcept

Swap operation.

inline bool is_affine() const

Tells whether this matrix represents an affine transformation, i.e., preserving points, straight lines, and planes. When used “correctly”, only (perspective) projection matrices should behave non-affinely (with the fourth row altering the homogeneity of the coordinates).

inline bool is_invertible() const

Tells whether this matrix is invertible (i.e., whether its determinant is non-zero).

float determinant() const

Returns the determinant of the matrix.

inline Matrix4x4 transposed() const

Returns a copy of this matrix transposed.

Matrix4x4 inverted() const

Returns a copy of this matrix inverted (if possible).

inline Vector4 get_row(unsigned i) const

Returns the i-th (0-indexed) row vector of this matrix.

inline Vector4 get_column(unsigned j) const

Returns the j-th (0-indexed) column vector of this matrix.

inline void to_axes(ml7::Vector3 &x, ml7::Vector3 &y, ml7::Vector3 &z) const

Extracts the basis vectors that define the transformed coordinate system (i.e., the column vectors of the 3x3 part of the matrix).

inline void to_axes(ml7::Vector3 &x, ml7::Vector3 &y, ml7::Vector3 &z, ml7::Vector3 &origin) const

Extracts the basis vectors and origin/translation vector that define the transformed coordinate system (i.e., the column vectors of the 3x4 part of the matrix).

inline void to_axes(ml7::Vector4 &x, ml7::Vector4 &y, ml7::Vector4 &z, ml7::Vector4 &w) const

Extracts the (column) vectors of this matrix.

bool to_axis_angle(ml7::Vector3 &axis, float &angle) const

Tries to extract the rotation axis and the rotation angle (in the range [0;pi]) the 3x3 part of this matrix is composed of. This only works if the 3x3 part actually consists of rotations only (no scalings, shears, etc.).

inline Matrix3x3 to_matrix3x3() const

Returns the 3x3 part of this matrix.

inline Matrix3x4 to_matrix3x4() const

Returns the 3x4 part of this matrix.

inline void decompose(ml7::Matrix3x3 &m3x3, ml7::Vector3 &translation) const

Decomposes the 3x4 part of this matrix into a 3x3 matrix and a translation vector.

bool decompose(ml7::Vector3 &scaling, ml7::Vector3 &axis, float &angle, ml7::Vector3 &translation) const

Tries to extract the scaling vector, the rotation axis, the rotation angle (in the range [0;pi]), and the translation vector this matrix is composed of. This only works if the matrix actually consists of translations, rotations and (positive) scalings in the “common” order (no projections, shears, negative scalings, etc.).

bool is_look_lh(ml7::Vector3 &position, ml7::Vector3 &look, ml7::Vector3 &up) const

Assumes that this matrix is a view transformation matrix for a left-handed coordinate system and tries to extract the camera position, the camera “look” direction, and the “up” direction.

bool is_look_rh(ml7::Vector3 &position, ml7::Vector3 &look, ml7::Vector3 &up) const

Assumes that this matrix is a view transformation matrix for a right-handed coordinate system and tries to extract the camera position, the camera “look” direction, and the “up” direction.

bool is_orthographic_lh(float &width, float &height, float &znear, float &zfar) const

Assumes that this matrix is an orthogonal projection matrix for a left-handed coordinate system and tries to extract the width and the height of the view volume as well as the distances to the near and far clipping planes.

bool is_orthographic_rh(float &width, float &height, float &znear, float &zfar) const

Assumes that this matrix is an orthogonal projection matrix for a right-handed coordinate system and tries to extract the width and the height of the view volume as well as the distances to the near and far clipping planes.

bool is_orthographic(float &width, float &height, float &znear, float &zfar) const

Assumes that this matrix in an orthogonal projection matrix (regardless of whether it is left- or right-handed) and tries to extract the width and the height of the view volume as well as the distances to the near and far clipping planes.

bool is_perspective_lh(float &fov, float &aspect, float &znear, float &zfar) const

Assumes that this matrix is a perspective projection matrix for a left-handed coordinate system and tries to extract the vertical field-of-view angle (in radians), the aspect ratio of the frustum’s width to its height, and the distances to the near and far clipping planes.

bool is_perspective_rh(float &fov, float &aspect, float &znear, float &zfar) const

Assumes that this matrix is a perspective projection matrix for a right-handed coordinate system and tries to extract the vertical field-of-view angle (in radians), the aspect ratio of the frustum’s width to its height, and the distances to the near and far clipping planes.

bool is_perspective(float &fov, float &aspect, float &znear, float &zfar) const

Assumes that this matrix is a perspective projection matrix (regardless of whether it is left- or right-handed) and tries to extract the vertical field-of-view angle (in radians), the aspect ratio of the frustum’s width to its height, and the distances to the near and far clipping planes.

bool is_projection(float &znear, float &zfar) const

Assumes that this matrix is a projection matrix (whether orthogonal or perspective, left- or right-handed) and tries to extract the distances to the near and far clipping planes.

inline constexpr Vector4 transform(const Vector4 &v) const

Returns a copy of the given (column) vector transformed by this matrix. Used to transform position vectors rather than direction vectors.

inline constexpr Vector3 transform(const Vector3 &v) const

Returns a copy of the given (column) vector transformed by this matrix. Used to transform position vectors rather than direction vectors.

inline constexpr Vector3 transform3x3(const Vector3 &v) const

Returns a copy of the given (column) vector transformed by the 3x3 part of this matrix. Used to transform direction vectors rather than position vectors.

Vector4 transform_inverted(const Vector4 &v) const

Returns a copy of the given (column) vector transformed by this matrix inverted (if possible). Used to transform position vectors rather than direction vectors.

Vector3 transform_inverted(const Vector3 &v) const

Returns a copy of the given (column) vector transformed by this matrix inverted (if possible). Used to transform position vectors rather than direction vectors.

Vector3 transform3x3_inverted(const Vector3 &v) const

Returns a copy of the given (column) vector transformed by the 3x3 part of this matrix inverted (if possible). Used to transform direction vectors rather than position vectors.

inline Matrix4x4 &transpose()

Transposes this matrix.

inline Matrix4x4 &invert()

Inverts this matrix (if possible).

inline Matrix4x4 &set_row(unsigned i, Vector4 v)

Sets the i-th (0-indexed) row vector of this matrix.

inline Matrix4x4 &set_column(unsigned j, Vector4 v)

Sets the j-th (0-indexed) column vector of this matrix.

inline bool operator==(const Matrix4x4 &m) const
inline bool operator!=(const Matrix4x4 &m) const
inline constexpr Matrix4x4 operator+() const

Returns a copy of this matrix unmodified.

inline constexpr Matrix4x4 operator-() const

Returns a copy of this matrix with the signs of the elements flipped.

inline constexpr Matrix4x4 operator+(const Matrix4x4 &m) const

Returns the (element-wise) matrix sum of two matrices.

inline constexpr Matrix4x4 operator-(const Matrix4x4 &m) const

Returns the (element-wise) matrix difference of two matrices.

inline constexpr Matrix4x4 operator*(float s) const

Returns a copy of this matrix “scaled” by the specified factor (scalar multiplication).

inline constexpr Matrix4x4 operator/(float s) const

Returns a copy of this matrix inversely “scaled” by the specified factor (scalar division).

inline constexpr Matrix4x4 operator*(const Matrix4x4 &m) const

Returns the matrix product of two matrices (matrix multiplication).

inline constexpr Vector4 operator*(const Vector4 &v) const

Returns a copy of the given (column vector) transformed by this matrix.

inline constexpr Vector3 operator*(const Vector3 &v) const

Returns a copy of the given (column vector) transformed by this matrix.

inline constexpr Matrix4x4 &operator+=(const Matrix4x4 &m)

Adds the given matrix to this one, resulting in the (element-wise) matrix sum.

inline constexpr Matrix4x4 &operator-=(const Matrix4x4 &m)

Subtracts the given matrix from this one, resulting in the (element-wise) matrix difference.

inline constexpr Matrix4x4 &operator*=(float s)

“Scales” this matrix by the specified factor (scalar multiplication).

inline constexpr Matrix4x4 &operator/=(float s)

Inversely “scales” this matrix by the specified factor (scalar division).

inline const float *operator[](unsigned i) const
inline float *operator[](unsigned i)

Public Members

float _11

Element in the 1st row and 1st column.

float _12

Element in the 1st row and 2nd column.

float _13

Element in the 1st row and 3rd column.

float _14

Element in the 1st row and 4th column.

float _21

Element in the 2nd row and 1st column.

float _22

Element in the 2nd row and 2nd column.

float _23

Element in the 2nd row and 3rd column.

float _24

Element in the 2nd row and 4th column.

float _31

Element in the 3rd row and 1st column.

float _32

Element in the 3rd row and 2nd column.

float _33

Element in the 3rd row and 3rd column.

float _34

Element in the 3rd row and 4th column.

float _41

Element in the 4th row and 1st column.

float _42

Element in the 4th row and 2nd column.

float _43

Element in the 4th row and 3rd column.

float _44

Element in the 4th row and 4th column.

float data[16]

Array of the elements.

float m[4][4]

2D array of the elements.

union ml7::Matrix4x4

Public Static Functions

static inline constexpr Matrix4x4 from_axes(const ml7::Vector3 &x, const ml7::Vector3 &y, const ml7::Vector3 &z)

Initializes an affine transformation matrix from the specified basis vectors that define the transformed coordinate system (as the column vectors of the 3x4 part of the matrix).

static inline constexpr Matrix4x4 from_axes(const ml7::Vector3 &x, const ml7::Vector3 &y, const ml7::Vector3 &z, const ml7::Vector3 &origin)

Initializes an affine transformation matrix from the specified basis vectors and origin/translation vector that define the transformed coordinate system (as the column vectors of the 3x4 part of the matrix).

static inline constexpr Matrix4x4 from_axes(const ml7::Vector4 &x, const ml7::Vector4 &y, const ml7::Vector4 &z, const ml7::Vector4 &w)

Initializes a transformation matrix from the specified (column) vectors.

static inline constexpr Matrix4x4 scaling(float s)

Initializes a scaling matrix with scaling factor s.

static inline constexpr Matrix4x4 scaling(const ml7::Vector3 &s)

Initializes a scaling matrix with scaling vector s.

static inline Matrix4x4 rotx(float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around the x-axis.

static inline Matrix4x4 rotx(float sin, float cos)

Initializes a rotation matrix representing a rotation around the x-axis based on ready-made sine and cosine values.

static inline Matrix4x4 roty(float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around the y-axis.

static inline Matrix4x4 roty(float sin, float cos)

Initializes a rotation matrix representing a rotation around the y-axis based on ready-made sine and cosine values.

static inline Matrix4x4 rotz(float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around the z-axis.

static inline Matrix4x4 rotz(float sin, float cos)

Initializes a rotation matrix representing a rotation around the z-axis based on ready-made sine and cosine values.

static inline Matrix4x4 rotation(const ml7::Vector3 &axis_angle)

Initializes a rotation matrix representing a rotation around the specified axis, with an angle equal to the magnitude of the specified vector (in radians).

static inline Matrix4x4 rotation(const ml7::Vector3 &axis, float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around the specified axis.

static Matrix4x4 rotation_normalized(const ml7::Vector3 &unit_axis, float angle)

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around an axis specified as a normalized unit vector.

Initializes a rotation matrix representing a rotation by a certain angle (in radians) around an axis specified as a unit vector.

static inline Matrix4x4 translation(const ml7::Vector3 &translation)

Initializes a translation matrix from the specified translation vector.

static inline Matrix4x4 compose(float scaling, const ml7::Vector3 &axis, float angle, const ml7::Vector3 &translation)

Initializes a transformation matrix from the specified scaling factor, a rotation axis, a rotation angle (in radians), and a translation vector.

static Matrix4x4 compose(const ml7::Vector3 &scaling, const ml7::Vector3 &axis, float angle, const ml7::Vector3 &translation)

Initializes a transformation matrix from the specified scaling vector, a rotation axis, a rotation angle (in radians), and a translation vector.

static Matrix4x4 look_at_lh(const Vector3 &position, const Vector3 &focus, const Vector3 &up)

Initializes a view transformation matrix for a left-handed coordinate system using a camera position, a focal point, and an “up” direction.

static Matrix4x4 look_at_rh(const Vector3 &position, const Vector3 &focus, const Vector3 &up)

Initializes a view transformation matrix for a right-handed coordinate system using a camera position, a focal point, and an “up” direction.

static Matrix4x4 look_to_lh(const Vector3 &position, const Vector3 &look, const Vector3 &up)

Initializes a view transformation matrix for a left-handed coordinate system using a camera position, a camera “look” direction, and an “up” direction.

static Matrix4x4 look_to_rh(const Vector3 &position, const Vector3 &look, const Vector3 &up)

Initializes a view transformation matrix for a right-handed coordinate system using a camera position, a camera “look” direction, and an “up” direction.

static Matrix4x4 orthographic_lh(float width, float height, float znear, float zfar)

Initializes an orthogonal projection matrix for a left-handed coordinate system using a width and a height of the view volume as well as distances to the near and far clipping planes.

static Matrix4x4 orthographic_rh(float width, float height, float znear, float zfar)

Initializes an orthogonal projection matrix for a right-handed coordinate system using a width and a height of the view volume as well as distances to the near and far clipping planes.

static Matrix4x4 perspective_lh(float fov, float aspect, float znear, float zfar)

Initializes a perspective projection matrix for a left-handed coordinate system using a vertical field-of-view angle (in radians), an aspect ratio of the frustum’s width to its height, and distances to the near and far clipping planes.

static Matrix4x4 perspective_rh(float fov, float aspect, float znear, float zfar)

Initializes a perspective projection matrix for a right-handed coordinate system using a vertical field-of-view angle (in radians), an aspect ratio of the frustum’s width to its height, and distances to the near and far clipping planes.

static Matrix4x4 luminance(const ml7::Vector3 &l)

Initializes a color transformation matrix using a luminance vector that specifies the weighted sum of the r, g, and b color components, allowing to customize how each component contributes to the (grayscale) result.

static Matrix4x4 saturation(const ml7::Vector3 &s)

Initializes a color transformation matrix using a saturation vector that specifies the respective saturation for the r, g, and b color components. The grayscale weights for the r, g, and b color components are given by the luminance vector l = (0.3086, 0.6094, 0.0820) to maintain the brightness. These values are better for linear RGB colors. The NTSC weights of 0.299, 0.587, and 0.114 are only applicable to RGB colors in a gamma 2.2 color space. Interesting: This can also be used to complement the color by specifying a saturation of -1. Note: When s is set to 0, the matrix becomes a “convert to luminance” matrix transforming the color to grayscale according to the luminance vector. When s is set to 1, the matrix becomes the identity matrix leaving the color unchanged.

static Matrix4x4 saturation(const ml7::Vector3 &s, const ml7::Vector3 &l)

Initializes a color transformation matrix using a saturation vector that specifies the respective saturation for the r, g, and b color components. The grayscale weights for the r, g, and b color components are given by the specified luminance vector l to maintain the perceived brightness. Interesting: This can also be used to complement the color by specifying a saturation of -1. Note: When s is set to 0, the matrix becomes a “convert to luminance” matrix transforming the color to grayscale according to the luminance vector. When s is set to 1, the matrix becomes the identity matrix leaving the color unchanged.

static Matrix4x4 contrast(const ml7::Vector3 &c)

Initializes a color transformation matrix using a contrast vector that specifies the respective contrast for the r, g, and b color components. Interesting: This can also be used to alter the color balance. Note: When c is set to 0, the resulting “color” is a constant gray with all three color components set to 0.5. When c is set to 1, the matrix becomes the identity matrix leaving the color unchanged.

static Matrix4x4 hue(float r)

Initializes a color transformation matrix using a rotation angle (in radians) that specifies how much to rotate the r, g, and b color components. The grayscale weights for the r, g, and b color components are given by the luminance vector l = (0.3086, 0.6094, 0.0820) to maintain the brightness. These values are better for linear RGB colors. The NTSC weights of 0.299, 0.587, and 0.114 are only applicable to RGB colors in a gamma 2.2 color space.

static Matrix4x4 hue(float r, const ml7::Vector3 &l)

Initializes a color transformation matrix using a rotation angle (in radians) that specifies how much to rotate the r, g, and b color components. The grayscale weights for the r, g, and b color components are given by the specified luminance vector l to maintain the perceived brightness.

Public Static Attributes

static const Matrix4x4 ZERO = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}
static const Matrix4x4 IDENTITY = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}
struct Memory
#include <RenderingDevice.h>

Public Members

size_t dedicated_video_memory = 0

The number of bytes of dedicated video memory that are not shared with the CPU.

size_t dedicated_system_memory = 0

The number of bytes of dedicated system memory that are not shared with the CPU. This memory is allocated from available system memory at boot time.

size_t shared_system_memory = 0

The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.

struct MemoryStatus
#include <MemoryStatus.h>

Public Functions

MemoryStatus()
bool capture()

Retrieves information about the system’s current usage of both physical and virtual memory.

Public Members

unsigned long long total_physical_memory

The total amount of usable physical memory, in bytes.

unsigned long long available_physical_memory

The amount of physical memory currently available, in bytes. This is the amount of physical memory that can be immediately reused without having to write its contents to disk first.

unsigned long long used_physical_memory

The amount of physical memory currently in use, in bytes.

class MeshBuffer : public xl7::resources::Resource
#include <MeshBuffer.h>

Subclassed by xl7::graphics::meshes::IndexBuffer, xl7::graphics::meshes::VertexBuffer

Public Types

enum class Type

Values:

enumerator VertexBuffer
enumerator IndexBuffer

Public Functions

XL7_DECLARE_RESOURCE_ID()
MeshBuffer() = delete
MeshBuffer(const MeshBuffer&) = delete
MeshBuffer &operator=(const MeshBuffer&) = delete
MeshBuffer(MeshBuffer&&) = delete
MeshBuffer &operator=(MeshBuffer&&) = delete
inline Type get_type() const

Returns the type of the buffer.

inline const Desc &get_desc() const

Returns the descriptor of the buffer.

inline unsigned get_primitive_count() const

Returns the number of primitives represented by this buffer.

inline unsigned get_stride() const

Returns the size of each buffer element, in bytes.

inline unsigned get_size() const

Returns the size of this buffer, in bytes.

bool update(const resources::DataProvider &data_provider)

Updates the contents of this buffer (unless it is immutable).

Protected Functions

template<class TDesc>
inline MeshBuffer(Type type, const CreateParams<TDesc> &params, unsigned stride)
~MeshBuffer() override = default

Private Functions

virtual bool _update_impl(const resources::DataProvider &data_provider, bool discard, bool no_overwrite) = 0

Updates the contents of this buffer (unless it is immutable). The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _check_data_impl(const resources::DataProvider &data_provider) override

Checks whether the given data provider complies with the specific properties of the resource to (re)populate it, taking into account the current state of the resource if necessary.

Private Members

const Type _type

The type of the buffer.

const Desc _desc

The descriptor of the buffer.

const unsigned _primitive_count

The number of primitives represented by this buffer.

const unsigned _stride

The size of each buffer element, in bytes.

const unsigned _size

The size of this buffer, in bytes.

class MeshManager : public xl7::resources::ResourceManager
#include <MeshManager.h>

Public Functions

MeshManager() = delete
MeshManager(const MeshManager&) = delete
MeshManager &operator=(const MeshManager&) = delete
MeshManager(MeshManager&&) = delete
MeshManager &operator=(MeshManager&&) = delete
template<class TVertex>
inline VertexBuffer::ID create_vertex_buffer(cl7::u8string_view identifier, const VertexBuffer::Desc &desc, const VertexDataProvider<TVertex> &vertex_data_provider)

Creates and acquires the specified vertex shader.

template<class TIndex>
inline IndexBuffer::ID create_index_buffer(cl7::u8string_view identifier, const IndexBuffer::Desc &desc, const IndexDataProvider<TIndex> &index_data_provider)

Creates and acquires the specified index buffer.

Protected Functions

inline MeshManager(IMeshFactory *factory)
~MeshManager() override = default

Private Functions

VertexBuffer::ID _create_vertex_buffer(cl7::u8string_view identifier, const VertexBuffer::Desc &desc, const resources::DataProvider &data_provider)

Creates and acquires the specified vertex shader.

IndexBuffer::ID _create_index_buffer(cl7::u8string_view identifier, const IndexBuffer::Desc &desc, const resources::DataProvider &data_provider)

Creates and acquires the specified index buffer.

Private Members

IMeshFactory *const _factory

The mesh factory.

struct MeshUtil
#include <MeshUtil.h>

Public Static Functions

static unsigned calculate_default_vertex_stride(const VertexLayout &vertex_layout)

Calculates the minimum expected size of a vertex of the specified vertex layout, in bytes.

static unsigned get_index_stride(IndexType index_type)

Returns the size of an index of the specified index type, in bytes.

static unsigned calculate_vertex_index_count(Topology topology, unsigned primitive_count)

Calculates the corresponding number of vertices/indices for the specified topology and number of primitives.

static unsigned calculate_primitive_count(Topology topology, unsigned vertex_index_count)

Calculates the corresponding number of primitives for the specified topology and number of vertices/indices.

struct Meta : public tl7::Signature
#include <Meta.h>

Description of any test incident (e.g., registered test case, failed check, warning, exception, etc.).

Public Functions

inline Meta(cl7::u8string_view stringification, const char *file_path, unsigned line_number, signed iteration_number = -1)
auto operator<=>(const Meta &rhs) const = default

Public Members

cl7::u8string stringification

The textual description of the test incident.

struct MultiLineOptions
#include <JsonWriter.h>

Public Types

enum class Indentation : unsigned

Values:

enumerator Tabs
enumerator Spaces2
enumerator Spaces4
enum class LineEnding

Values:

enumerator CRLF
enumerator LF
enumerator CR

Public Members

Indentation indentation = Indentation::Spaces4
LineEnding line_ending = LineEnding::LF
bool add_trailing_commas = false
bool add_empty_line = false
struct Options
#include <Base64.h>

Public Members

cl7::u8char_type ch62

The second last character used in the Base64 alphabet at position 62 (default: ‘+’).

cl7::u8char_type ch63

The very last character used in the Base64 alphabet at position 63 (default: ‘/’).

bool pad

The flag specifying whether the Base64 text is padded to always be a multiple of 4 characters (padding character: ‘=’).

size_t line_length

The maximum line length (default: 76 characters).

bool insert_breaks

The flag specifying whether to insert line breaks if the maximum line length is reached (default: false).

struct Options
#include <Lexer.h>

Public Members

WhitespaceHandling whitespace_handling = WhitespaceHandling::Discard
template<typename Key, typename T, typename KeyView = Key, typename Compare = std::less<KeyView>, typename Allocator = std::allocator<std::pair<Key, T>>>
class ordered_map
#include <ordered_map.h>

Public Types

using key_type = Key
using mapped_type = T
using value_type = std::pair<const Key, T>
using size_type = std::size_t
using difference_type = std::ptrdiff_t
using key_compare = Compare
using allocator_type = Allocator
using reference = value_type&
using const_reference = const value_type&
using pointer = typename std::allocator_traits<allocator_type>::pointer
using const_pointer = typename std::allocator_traits<allocator_type>::const_pointer
using vector_type = std::vector<std::pair<Key, T>, Allocator>
using iterator = cl7::continuous_forward_iterator<false, value_type, typename vector_type::value_type>
using const_iterator = cl7::continuous_forward_iterator<true, value_type, typename vector_type::value_type>

Public Functions

inline ordered_map()
inline ordered_map(const Compare &comp, const Allocator &alloc = Allocator())
inline explicit ordered_map(const Allocator &alloc)
template<class It>
inline ordered_map(It first, It last, const Compare &comp = Compare(), const Allocator &alloc = Allocator())
template<class It>
inline ordered_map(It first, It last, const Allocator &alloc)
inline ordered_map(const ordered_map &other)
inline ordered_map(const ordered_map &other, const Allocator &alloc)
inline ordered_map(ordered_map &&other)
inline ordered_map(ordered_map &&other, const Allocator &alloc)
inline ordered_map(std::initializer_list<typename vector_type::value_type> ilist, const Compare &comp = Compare(), const Allocator &alloc = Allocator())
inline ordered_map(std::initializer_list<typename vector_type::value_type> ilist, const Allocator &alloc)
inline ordered_map &operator=(const ordered_map &other)
inline ordered_map &operator=(ordered_map &&other)
inline ordered_map &operator=(std::initializer_list<typename vector_type::value_type> ilist)
~ordered_map() noexcept = default
inline void swap(ordered_map &other)
inline key_compare key_comp() const

Returns the function that compares keys.

inline allocator_type get_allocator() const

Returns the allocator associated with the container.

inline bool empty() const noexcept

Checks whether the container is empty.

inline size_type size() const noexcept

Returns the number of elements.

inline size_type max_size() const noexcept

Returns the maximum possible number of elements.

inline size_type capacity() const noexcept

Returns the number of elements that can be held in currently allocated storage.

inline void reserve(size_type new_capacity)

Reserves storage.

inline void shrink_to_fit()

Reduces memory usage by freeing unused memory.

inline iterator find(const KeyView &key)

Finds element with specific key.

inline const_iterator find(const KeyView &key) const

Finds element with specific key.

inline bool contains(const KeyView &key) const

Checks if the container contains element with specific key.

inline void clear() noexcept

Clears the contents.

template<typename Key_, typename T_>
inline std::pair<iterator, bool> insert(Key_ &&key, T_ &&value)

Inserts elements.

inline std::pair<iterator, bool> insert(const value_type &value)

Inserts elements.

inline std::pair<iterator, bool> insert(value_type &&value)

Inserts elements.

template<typename ...Args>
inline std::pair<iterator, bool> emplace(Args&&... args)

Constructs element in-place.

inline iterator erase(iterator it)

Erases elements.

inline iterator erase(const_iterator it)

Erases elements.

inline size_type erase(const KeyView &key)

Erases elements.

inline iterator begin() noexcept
inline iterator end() noexcept
inline const_iterator begin() const noexcept
inline const_iterator end() const noexcept
inline const_iterator cbegin() const noexcept
inline const_iterator cend() const noexcept
inline T &at(const KeyView &key)

Access specified element with bounds checking.

inline const T &at(const KeyView &key) const

Access specified element with bounds checking.

inline T &operator[](const KeyView &key)

Access or insert specified element.

inline T &operator[](Key &&key)

Access or insert specified element.

inline bool operator==(const ordered_map &other) const noexcept
inline bool operator!=(const ordered_map &other) const noexcept

Private Types

using table_type = std::set<Lookup, LookupCompare>

Private Functions

inline void _rebuild_lookup_table()
inline void _dismantle_partial_table(size_t index)
inline void _restore_partial_table(size_t index)
template<typename T_>
inline std::pair<iterator, bool> _update_and_return_iterator_false(typename table_type::iterator it, T_ &&value)
inline std::pair<iterator, bool> _map_after_insert_and_return_iterator_true(typename table_type::iterator it)
inline T &_map_after_insert_and_return_reference(typename table_type::iterator it)
inline void _map_after_insert(typename table_type::iterator it)
inline void _erase(size_t index)

Private Members

vector_type _vector
LookupCompare _compare
table_type _table
class OutputMergerStage : public xl7::graphics::pipeline::AbstractStage

Public Static Attributes

static constexpr unsigned MAX_RENDER_TARGETS = 8

The maximum number of concurrent (color) render targets (ignoring hardware/driver capabilities).

Private Functions

XL7_GRAPHICS_PIPELINE_STATE_ARRAY_DEFAULT0(color_render_target_id, MAX_RENDER_TARGETS, surfaces::ColorRenderTarget::ID, surfaces::ColorRenderTarget::ID(), DIRTY_COLOR_RENDER_TARGET_FLAG_BASE)
XL7_GRAPHICS_PIPELINE_SINGLE_STATE(depth_stencil_target_id, surfaces::DepthStencilTarget::ID, surfaces::DepthStencilTarget::ID(), DIRTY_DEPTH_STENCTIL_TARGET_FLAG)
XL7_GRAPHICS_PIPELINE_SINGLE_STATE(depth_stencil_state_id, states::DepthStencilState::ID, states::DepthStencilState::ID(), DIRTY_DEPTH_STENCIL_STATE_FLAG)
XL7_GRAPHICS_PIPELINE_SINGLE_STATE (stencil_reference_value, unsigned, 0x00000000, DIRTY_STENCIL_REFERENCE_VALUE_FLAG)
XL7_GRAPHICS_PIPELINE_SINGLE_STATE(blend_state_id, states::BlendState::ID, states::BlendState::ID(), DIRTY_BLEND_STATE_FLAG)
XL7_GRAPHICS_PIPELINE_SINGLE_STATE (blend_factor, Color, Color(1.0f, 1.0f, 1.0f, 1.0f), DIRTY_BLEND_FACTOR_FLAG)

Private Static Attributes

static constexpr unsigned DIRTY_COLOR_RENDER_TARGET_FLAG_BASE = 0x01
static constexpr unsigned DIRTY_COLOR_RENDER_TARGET_FLAG_MASK = ((DIRTY_COLOR_RENDER_TARGET_FLAG_BASE << MAX_RENDER_TARGETS) - 1) & ~(DIRTY_COLOR_RENDER_TARGET_FLAG_BASE - 1)
static constexpr unsigned DIRTY_DEPTH_STENCTIL_TARGET_FLAG = 0x02 << (MAX_RENDER_TARGETS - 1)
static constexpr unsigned DIRTY_DEPTH_STENCIL_STATE_FLAG = 0x04 << (MAX_RENDER_TARGETS - 1)
static constexpr unsigned DIRTY_STENCIL_REFERENCE_VALUE_FLAG = 0x08 << (MAX_RENDER_TARGETS - 1)
static constexpr unsigned DIRTY_BLEND_STATE_FLAG = 0x10 << (MAX_RENDER_TARGETS - 1)
static constexpr unsigned DIRTY_BLEND_FACTOR_FLAG = 0x20 << (MAX_RENDER_TARGETS - 1)
struct PaletteEntry

Public Members

std::byte r
std::byte g
std::byte b
struct ParentEntry

Public Members

cl7::u8string directory
cl7::u8string code
class Parser
#include <Parser.h>

Public Functions

Parser() = delete
Parser(const Grammar *grammar)

Explicit constructor.

Parser(const Parser&) = delete
Parser &operator=(const Parser&) = delete
Parser(Parser&&) = delete
Parser &operator=(Parser&&) = delete
virtual ~Parser() = default
bool parse(cl7::u8string_view text)
bool parse(const std::vector<Token> &tokens)

Private Members

const Grammar *_grammar

The underlying grammar.

struct PatternSymbol : public dl7::syntax::TerminalSymbol
#include <TerminalSymbol.h>

Public Functions

PatternSymbol(SymbolID id, std::string_view pattern, std::regex_constants::syntax_option_type syntax_options = std::regex_constants::ECMAScript, std::regex_constants::match_flag_type match_flags = std::regex_constants::match_default)
PatternSymbol(SymbolID id, std::string_view pattern, cl7::u8string_view literal_prefix, std::regex_constants::syntax_option_type syntax_options = std::regex_constants::ECMAScript, std::regex_constants::match_flag_type match_flags = std::regex_constants::match_default)
~PatternSymbol() override = default
inline virtual bool is_literal() const override
virtual size_t try_match_prefix(cl7::u8string_view source) const override

Public Members

std::string pattern

The dynamic regex pattern of the symbol.

std::regex_constants::syntax_option_type syntax_options

The bitmask that contains options that govern how the regular expression behaves (‘optimize’ is always applied).

std::regex_constants::match_flag_type match_flags

The bitmask that specifies additional regular expression matching options (‘match_continuous’ is always applied).

std::regex regex

The regular expression object to be used for matching.

cl7::u8string literal_prefix

The (optional) literal prefix of the symbol.

class Pipeline : public xl7::graphics::pipeline::AbstractPipelineObject
#include <Pipeline.h>

Public Members

InputAssemblerStage ia

The input assembler stage.

VertexShaderStage vs

The vertex shader stage.

RasterizerStage rs

The rasterizer stage.

PixelShaderStage ps

The pixel shader stage.

OutputMergerStage om

The output merger stage.

struct PixelBitKit
#include <PixelBitKit.h>

Public Types

enum class DataType

Values:

enumerator UNKNOWN
enumerator UNORM
enumerator SNORM
enumerator UINT
enumerator SINT
enumerator FLOAT

Public Functions

PixelBitKit(PixelFormat pixel_format, ChannelOrder channel_order)

Public Members

PixelFormat pixel_format

The pixel format.

ChannelOrder channel_order

The channel order.

unsigned channel_count

The number of channels in a pixel.

unsigned stride

The size of one pixel, in bytes.

Channel r
Channel g
Channel b
Channel a
Channel channels[4]
union xl7::graphics::PixelBitKit
DataType data_type

The data type of each channel.

unsigned uniform_depth = 0

The uniform bit depth of each channel (the size of each channel in bits), or zero if not all channels have the same bit depth.

Public Static Functions

static unsigned determine_channel_count(PixelFormat pixel_format)

Returns the channel count of the specified pixel format.

static unsigned determine_stride(PixelFormat pixel_format)

Returns the number of bytes of one pixel of the specified format.

static DataType determine_data_type(PixelFormat pixel_format)

Returns the data type of the specified pixel format.

class PixelShader : public xl7::graphics::shaders::Shader
#include <PixelShader.h>

Subclassed by xl7::graphics::impl::direct3d11::shaders::PixelShaderImpl, xl7::graphics::impl::direct3d9::shaders::PixelShaderImpl

Public Functions

XL7_DERIVE_RESOURCE_ID(Shader)
PixelShader() = delete
PixelShader(const PixelShader&) = delete
PixelShader &operator=(const PixelShader&) = delete
PixelShader(PixelShader&&) = delete
PixelShader &operator=(PixelShader&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

Protected Functions

PixelShader(const CreateParams<Desc> &params)
~PixelShader() override = default
class PixelShaderImpl : public xl7::graphics::shaders::PixelShader
#include <PixelShaderImpl.h>

Public Functions

PixelShaderImpl() = delete
PixelShaderImpl(const PixelShaderImpl&) = delete
PixelShaderImpl &operator=(const PixelShaderImpl&) = delete
PixelShaderImpl(PixelShaderImpl&&) = delete
PixelShaderImpl &operator=(PixelShaderImpl&&) = delete
inline ID3D11PixelShader *get_raw_d3d_pixel_shader() const

Returns the Direct3D 11 pixel shader interface.

Protected Functions

PixelShaderImpl(const CreateParams<Desc> &params)
~PixelShaderImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

virtual bool _acquire_precompiled_impl(const xl7::graphics::shaders::CodeDataProvider &code_data_provider) override

Requests/acquires a precompiled shader resource. The actual code of the given code provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included as it contains additional implementation-specific information.

virtual bool _acquire_recompilable_impl(const xl7::graphics::shaders::CodeDataProvider &code_data_provider, xl7::graphics::shaders::ShaderCode &bytecode_out) override

Requests/acquires a recompilable shader resource. The actual code of the given code provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included as it contains additional implementation-specific information.

virtual bool _recompile_impl(const xl7::graphics::shaders::CompileOptions &compile_options, xl7::graphics::shaders::ShaderCode &bytecode_out) override

Recompiles the shader code. This tends to result in the resource having to be completely recreated in the background.

virtual bool _reflect_impl(const xl7::graphics::shaders::ShaderCode &bytecode, xl7::graphics::shaders::ReflectionResult &reflection_result_out) override

Performs a “reflection” on the (compiled) shader bytecode to determine parameter declarations etc.

Private Members

wrl::ComPtr<ID3D11PixelShader> _d3d_pixel_shader

The Direct3D 11 pixel shader interface.

class PixelShaderImpl : public xl7::graphics::shaders::PixelShader
#include <PixelShaderImpl.h>

Public Functions

PixelShaderImpl() = delete
PixelShaderImpl(const PixelShaderImpl&) = delete
PixelShaderImpl &operator=(const PixelShaderImpl&) = delete
PixelShaderImpl(PixelShaderImpl&&) = delete
PixelShaderImpl &operator=(PixelShaderImpl&&) = delete
inline IDirect3DPixelShader9 *get_raw_d3d_pixel_shader() const

Returns the Direct3D 9 pixel shader interface.

Protected Functions

PixelShaderImpl(const CreateParams<Desc> &params)
~PixelShaderImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

virtual bool _acquire_precompiled_impl(const xl7::graphics::shaders::CodeDataProvider &code_data_provider) override

Requests/acquires a precompiled shader resource. The actual code of the given code provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included as it contains additional implementation-specific information.

virtual bool _acquire_recompilable_impl(const xl7::graphics::shaders::CodeDataProvider &code_data_provider, xl7::graphics::shaders::ShaderCode &bytecode_out) override

Requests/acquires a recompilable shader resource. The actual code of the given code provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included as it contains additional implementation-specific information.

virtual bool _recompile_impl(const xl7::graphics::shaders::CompileOptions &compile_options, xl7::graphics::shaders::ShaderCode &bytecode_out) override

Recompiles the shader code. This tends to result in the resource having to be completely recreated in the background.

virtual bool _reflect_impl(const xl7::graphics::shaders::ShaderCode &bytecode, xl7::graphics::shaders::ReflectionResult &reflection_result_out) override

Performs a “reflection” on the (compiled) shader bytecode to determine parameter declarations etc.

Private Members

wrl::ComPtr<IDirect3DPixelShader9> _d3d_pixel_shader

The Direct3D 9 pixel shader interface.

class PixelShaderStage : public xl7::graphics::pipeline::AbstractShaderStage
#include <PixelShaderStage.h>

Private Functions

XL7_GRAPHICS_PIPELINE_SPECIFIC_STATE_PROXY(pixel_shader_id, shaders::PixelShader::ID, shader_id, xl7::resources::id_cast<shaders::PixelShader::ID>)
class PngImageHandler : public xl7::graphics::images::ImageHandler
#include <PngImageHandler.h>

Public Functions

~PngImageHandler() override = default

Private Functions

virtual bool _load_from(cl7::io::irom &rom, const cl7::u8string &rom_name, Image &image) override

Loads an image from any rom.

Private Static Functions

static bool _process_chunks(cl7::io::irom &rom, const cl7::u8string &rom_name, BitInfo &bit_info, std::vector<PaletteEntry> &palette, cl7::byte_vector &data)

Processes the PNG chunks.

static bool _process_IHDR_chunk(cl7::io::irom &rom, const cl7::u8string &rom_name, uint32_t chunk_length, BitInfo &bit_info)

Processes the image header chunk, “IHDR”.

static bool _process_PLTE_chunk(cl7::io::irom &rom, const cl7::u8string &rom_name, uint32_t chunk_length, std::vector<PaletteEntry> &palette)

Processes the palette chunk, “PLTE”.

static bool _process_IDAT_chunk(cl7::io::irom &rom, const cl7::u8string &rom_name, uint32_t chunk_length, cl7::byte_vector &data)

Processes the image data chunk, “IDAT”.

static bool _decompress(cl7::byte_view src, cl7::byte_vector &dst)

Decompresses the given source data.

static bool _reconstruct(cl7::byte_view src, cl7::byte_vector &dst, const BitInfo &bit_info)

Reconstructs the target data from the given filtered source data.

static bool _reconstruct_scanline_filter0_none(cl7::byte_view src, cl7::byte_vector &dst, const BitInfo &bit_info, unsigned si, unsigned di)

Filter type “None” (0): the scanline is transmitted unmodified.

static bool _reconstruct_scanline_filter1_sub(cl7::byte_view src, cl7::byte_vector &dst, const BitInfo &bit_info, unsigned si, unsigned di)

Filter type “Sub” (1): the Sub filter transmits the difference between each byte and the value of the corresponding byte of the prior pixel.

static bool _reconstruct_scanline_filter2_up(cl7::byte_view src, cl7::byte_vector &dst, const BitInfo &bit_info, unsigned si, unsigned di)

Filter type “Up” (2): the Up filter transmits the difference between each byte and the value of the corresponding byte of the prior scanline.

static bool _reconstruct_scanline_filter3_average(cl7::byte_view src, cl7::byte_vector &dst, const BitInfo &bit_info, unsigned si, unsigned di)

Filter type “Average” (3): the Average filter uses the average of the two neighboring pixels (left and above) to predict the value of a pixel.

static bool _reconstruct_scanline_filter4_paeth(cl7::byte_view src, cl7::byte_vector &dst, const BitInfo &bit_info, unsigned si, unsigned di)

Filter type “Paeth” (4): the Paeth filter computes a single linear function of the three neighboring pixel (left, above, upper left), then chooses as predictor the neighboring pixel closest to the computed value.

Private Static Attributes

static constexpr unsigned char CT_PALETTE_USED = 1
static constexpr unsigned char CT_COLOR_USED = 2
static constexpr unsigned char CT_ALPHA_USED = 4
struct ProductionRule
#include <ProductionRule.h>

Public Functions

bool is_used(SymbolID symbol_id) const

Checks whether the specified symbol is used in the sequence of this production rule.

Public Members

SymbolID symbol_id

The non-terminal symbol ID (left-hand side of the production rule).

std::vector<SymbolID> sequence

The sequence of terminal/non-terminal symbols (right-hand side of the production rule).

class ProductionRuleCollection

A “set” of non-terminal symbols and their production rules for BNF-like grammars. A symbol can be defined multiple times, to represent the aspect of choices.

Public Types

using const_iterator = std::vector<ProductionRule>::const_iterator

Public Functions

inline const_iterator begin() const
inline const_iterator end() const
void add(ProductionRule production_rule)

Adds the specified production rule the collection.

void add(SymbolID symbol_id, const std::vector<SymbolID> &sequence)

Adds the specified production rule the collection.

void add(SymbolID symbol_id, std::vector<SymbolID> &&sequence)

Adds the specified production rule the collection.

inline size_t get_count() const

Returns the number of contained production rules.

inline const ProductionRule &get(size_t index) const

Returns the production rule identified by the given index.

bool is_defined(SymbolID symbol_id) const

Checks whether the assumed non-terminal symbol is defined by any production rule.

bool is_used(SymbolID symbol_id) const

Checks whether the specified symbol is used in any production rule.

Private Members

std::vector<ProductionRule> _production_rules

The “list” of production rules.

class Profiler
#include <Profiler.h>

Public Functions

Profiler() = delete
Profiler(const cl7::u8string &sample_name)
Profiler(const cl7::u8string &sample_name, Registry *registry)
Profiler(const Profiler&) = delete
Profiler &operator=(const Profiler&) = delete
Profiler(Profiler&&) = delete
Profiler &operator=(Profiler&&) = delete
~Profiler()

Private Members

Registry *const _registry

The registry that stores the sample.

Sample *const _sample

The sample “attended” by this profiler.

struct Quaternion
#include <Quaternion.h>

Public Functions

inline constexpr Quaternion() noexcept

Default constructor. Initializes the quaternion with v = (0, 0, 0) and s = 1.

inline constexpr Quaternion(float x, float y, float z, float w) noexcept

Explicit constructor with parameters for the vector/imaginary part v = (x, y, z) and the scalar/real part s = w.

inline constexpr Quaternion(const ml7::Vector3 &v, float s) noexcept

Explicit constructor with parameters for the vector/imaginary part v and the scalar/real part s.

inline explicit constexpr Quaternion(const ml7::Matrix3x3 &m)

Explicit constructor that initializes a quaternion from the specified rotation matrix.

void swap(Quaternion &other) noexcept

Swap operation.

inline bool is_invertible() const

Tells whether this quaternion is invertible (i.e., whether it is non-zero).

inline float norm() const

Returns the magnitude of this quaternion.

Quaternion normalized() const

Returns a copy of this quaternion normalized (if possible).

Returns a copy of this quaternion normalized.

inline Quaternion conjugated() const

Returns the conjugate of this quaternion.

Quaternion inverted() const

Returns a copy of this quaternion inverted (if possible).

inline float dot(const Quaternion &q) const

Returns the dot/scalar product of this and a given quaternion q.

Matrix3x3 to_matrix3x3() const

Returns the rotation matrix corresponding to this object quaternion.

void to_axes(ml7::Vector3 &x, ml7::Vector3 &y, ml7::Vector3 &z) const

Extracts the basis vectors that define the transformed coordinate system.

bool to_axis_angle(ml7::Vector3 &axis, float &angle) const

Tries to extract the rotation axis and the rotation angle (in the range [0;pi]) this quaternion is composed of.

bool is_look_lh(ml7::Vector3 &look, ml7::Vector3 &up) const

Assumes that this quaternion represents a “view” rotation for a left-handed coordinate system and tries to extract the camera “look” direction and the “up” direction.

bool is_look_rh(ml7::Vector3 &look, ml7::Vector3 &up) const

Assumes that this quaternion represents a “view” rotation for a right-handed coordinate system and tries to extract the camera “look” direction and the “up” direction.

Vector3 transform(const Vector3 &v) const

Returns a copy of the given vector transformed by this quaternion.

Vector3 transform_inverted(const Vector3 &v) const

Returns a copy of the given vector transformed by this quaternion inverted (if possible).

inline Quaternion &normalize()

Normalizes this quaternion (if possible).

inline Quaternion &conjugate()

Conjugates this quaternion.

inline Quaternion &invert()

Inverts this quaternion (if possible).

inline bool operator==(const Quaternion &q) const
inline bool operator!=(const Quaternion &q) const
inline constexpr Quaternion operator+() const

Returns a copy of this quaternion unmodified.

inline constexpr Quaternion operator-() const

Returns a copy of this quaternion with the signs of the components flipped.

inline constexpr Quaternion operator+(const Quaternion &v) const

Returns the (component-wise) sum of two quaternions.

inline constexpr Quaternion operator-(const Quaternion &v) const

Returns the (component-wise) difference of two quaternions.

inline constexpr Quaternion operator*(float s) const

Returns a copy of this quaternion “scaled” by the specified factor (scalar multiplication).

inline constexpr Quaternion operator/(float s) const

Returns a copy of this quaternion inversely “scaled” by the specified factor (scalar division).

inline constexpr Quaternion operator*(const Quaternion &q) const

Returns the quaternion product of two quaternions (quaternion multiplication).

inline Vector3 operator*(const Vector3 &v) const

Returns a copy of the given vector transformed by this quaternion.

inline constexpr Quaternion &operator+=(const Quaternion &v)

Adds the given quaternion to this one, resulting in the (component-wise) quaternion sum.

inline constexpr Quaternion &operator-=(const Quaternion &v)

Subtracts the given quaternion from this one, resulting in the (component-wise) quaternion difference.

inline constexpr Quaternion &operator*=(float s)

“Scales” this quaternion by the specified factor (scalar multiplication).

inline constexpr Quaternion &operator/=(float s)

Inversely “scales” this quaternion by the specified factor (scalar division).

inline float operator[](unsigned i) const
inline float &operator[](unsigned i)

Public Members

float x

The quaternion’s first imaginary component.

float y

The quaternion’s second imaginary component.

float z

The quaternion’s third imaginary component.

float w

The quaternion’s scalar/real part.

float data[4]

Array of all four components.

union ml7::Quaternion

Public Static Functions

static inline constexpr Quaternion from_matrix3x3(const ml7::Matrix3x3 &m)

Initializes a quaternion from the specified rotation matrix.

static inline constexpr Quaternion from_axes(const ml7::Vector3 &x, const ml7::Vector3 &y, const ml7::Vector3 &z)

Initializes a quaternion from the specified basis vectors that define the transformed coordinate system.

static inline Quaternion rotx(float angle)

Initializes a quaternion representing a rotation by a certain angle (in radians) around the x-axis.

static inline Quaternion roty(float angle)

Initializes a quaternion representing a rotation by a certain angle (in radians) around the y-axis.

static inline Quaternion rotz(float angle)

Initializes a quaternion representing a rotation by a certain angle (in radians) around the z-axis.

static inline Quaternion rotation(const ml7::Vector3 &axis_angle)

Initializes a quaternion representing a rotation around the specified axis, with an angle equal to the magnitude of the specified vector (in radians).

static inline Quaternion rotation(const ml7::Vector3 &axis, float angle)

Initializes a quaternion representing a rotation by a certain angle (in radians) around the specified axis.

static inline Quaternion rotation_normalized(const ml7::Vector3 &unit_axis, float angle)

Initializes a quaternion representing a rotation by a certain angle (in radians) around an axis specified as a normalized unit vector.

static inline Quaternion look_lh(const Vector3 &look, const Vector3 &up)

Initializes a quaternion representing a “view” rotation for a left-handed coordinate system using a camera “look” direction and an “up” direction.

static inline Quaternion look_rh(const Vector3 &look, const Vector3 &up)

Initializes a quaternion representing a “view” rotation for a right-handed coordinate system using a camera “look” direction and an “up” direction.

Public Static Attributes

static const Quaternion ZERO = {0.0f, 0.0f, 0.0f, 0.0f}
static const Quaternion IDENTITY = {0.0f, 0.0f, 0.0f, 1.0f}
class RasterizerStage : public xl7::graphics::pipeline::AbstractStage
#include <RasterizerStage.h>

Private Functions

XL7_GRAPHICS_PIPELINE_SINGLE_STATE(viewport, Viewport, Viewport(), DIRTY_VIEWPORT_FLAG)
XL7_GRAPHICS_PIPELINE_SINGLE_STATE(rasterizer_state_id, states::RasterizerState::ID, states::RasterizerState::ID(), DIRTY_RASTERIER_STATE_FLAG)

Private Static Attributes

static constexpr unsigned DIRTY_VIEWPORT_FLAG = 0x1
static constexpr unsigned DIRTY_RASTERIER_STATE_FLAG = 0x2
class RasterizerState : public xl7::graphics::states::AbstractState
#include <RasterizerState.h>

Subclassed by xl7::graphics::impl::direct3d11::states::RasterizerStateImpl, xl7::graphics::impl::direct3d9::states::RasterizerStateImpl

Public Types

enum class FillMode

Determines the fill mode to use when rendering.

Values:

enumerator None

Do not draw anything at all.

enumerator Point

Draw the vertices as points.

enumerator Wireframe

Draw lines connecting the vertices.

enumerator Solid

Fill the triangles formed by the vertices.

enum class CullMode

Indicates which triangles should be discarded (culled).

Values:

enumerator None

Always draw all triangles.

enumerator Front

Do not draw triangles that are front-facing.

enumerator Back

Do not draw triangles that are back-facing.

enum class WindingOrder

Determines the orientation of the triangles.

Values:

enumerator Clockwise

Consider a triangle front-facing if its vertices are clockwise on the render target (consider back-facing if they are counter-clockwise).

enumerator CounterClockwise

Consider a triangle front-facing if its vertices are counter-clockwise on the render target (consider back-facing if they are clockwise).

Public Functions

XL7_DERIVE_RESOURCE_ID(AbstractState)
RasterizerState() = delete
RasterizerState(const RasterizerState&) = delete
RasterizerState &operator=(const RasterizerState&) = delete
RasterizerState(RasterizerState&&) = delete
RasterizerState &operator=(RasterizerState&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline const Desc &get_desc() const

Returns the descriptor of the rasterizer state.

Protected Functions

inline RasterizerState(const CreateParams<Desc> &params)
~RasterizerState() override = default

Private Members

const Desc _desc

The descriptor of the rasterizer state.

class RasterizerStateImpl : public xl7::graphics::states::RasterizerState

Public Functions

RasterizerStateImpl() = delete
RasterizerStateImpl(const RasterizerStateImpl&) = delete
RasterizerStateImpl &operator=(const RasterizerStateImpl&) = delete
RasterizerStateImpl(RasterizerStateImpl&&) = delete
RasterizerStateImpl &operator=(RasterizerStateImpl&&) = delete
inline ID3D11RasterizerState *get_raw_d3d_rasterizer_state() const

Returns the Direct3D 11 rasterizer state interface.

Public Static Functions

static void map_d3d_values(const Desc &desc, D3D11_RASTERIZER_DESC &d3d_rasterizer_desc)

Maps the specified rasterizer state descriptor to corresponding Direct3D 11 values and fills the given structure accordingly.

Protected Functions

RasterizerStateImpl(const CreateParams<Desc> &params)
~RasterizerStateImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _acquire_impl(const xl7::resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

Private Members

wrl::ComPtr<ID3D11RasterizerState> _d3d_rasterizer_state

The Direct3D 11 rasterizer state interface.

class RasterizerStateImpl : public xl7::graphics::states::RasterizerState

Public Functions

RasterizerStateImpl() = delete
RasterizerStateImpl(const RasterizerStateImpl&) = delete
RasterizerStateImpl &operator=(const RasterizerStateImpl&) = delete
RasterizerStateImpl(RasterizerStateImpl&&) = delete
RasterizerStateImpl &operator=(RasterizerStateImpl&&) = delete
inline const D3DRasterizerStateTypeValues &get_d3d_rasterizer_state_type_values() const

Returns the Direct3D 9 rasterizer state type values.

Public Static Functions

static void map_d3d_values(const Desc &desc, D3DRasterizerStateTypeValues &d3d_rasterizer_state_type_values)

Maps the specified rasterizer state descriptor to corresponding Direct3D 9 values and fills the given structure accordingly.

Protected Functions

RasterizerStateImpl(const CreateParams<Desc> &params)
~RasterizerStateImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _acquire_impl(const xl7::resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

Private Members

D3DRasterizerStateTypeValues _d3d_rasterizer_state_type_values

The Direct3D 9 rasterizer state type values.

struct ReflectionResult
#include <ReflectionResult.h>

Public Members

std::vector<ConstantBufferDeclaration> constant_buffer_declarations
std::vector<TextureSamplerDeclaration> texture_sampler_declarations
class Registry
#include <Registry.h>

Public Functions

Registry() = default
Registry(const Registry&) = delete
Registry &operator=(const Registry&) = delete
Registry(Registry&&) = delete
Registry &operator=(Registry&&) = delete
~Registry() = default
void end_frame_and_update_stats(unsigned frame_usecs)

“Closes” the current frame by updating the samples accordingly, implicitly starting a new frame.

void dump(cl7::logging::Logger *logger = nullptr) const

“Dumps” the profiling/sample stats to the specified logger (NULL: standard logger).

Private Types

using SampleKey = std::pair<cl7::u8string, Sample*>

Private Functions

Sample *_begin_sample(const cl7::u8string &sample_name)

Begins and returns the sample with the specified name.

void _end_sample(Sample *sample)

Ends the specified sample.

void _log(cl7::logging::Logger *logger, const Sample *sample, unsigned indent) const

Private Members

std::vector<std::unique_ptr<Sample>> _samples

A “linear list” of all registered samples.

std::map<SampleKey, SampleHandler> _sample_lookup

A lookup map to find samples and their handlers.

Sample *_last_opened_sample

The last opened sample (or NULL).

unsigned _open_sample_count

The number of currently open samples.

struct regs
#include <CPUID.h>

Public Members

unsigned eax
unsigned ebx
unsigned ecx
unsigned edx
class RenderingContext
#include <RenderingContext.h>

Subclassed by xl7::graphics::impl::direct3d11::RenderingContextImpl, xl7::graphics::impl::direct3d9::RenderingContextImpl

Public Functions

RenderingContext() = delete
RenderingContext(const RenderingContext&) = delete
RenderingContext &operator=(const RenderingContext&) = delete
RenderingContext(RenderingContext&&) = delete
RenderingContext &operator=(RenderingContext&&) = delete
inline RenderingDevice *get_rendering_device() const

Returns the owning rendering device.

template<class TRenderingDeviceImpl>
inline TRenderingDeviceImpl *get_rendering_device_impl() const

Returns the owning rendering device implementation.

inline unsigned get_index() const

Returns the 0-based index of the context (0: primary context).

inline bool is_primary() const

Indicates whether this is the primary rendering context.

inline bool is_scene_on() const

Returns the flag indicating whether the function begin_scene has been called without a following call to end_scene.

bool synchronize_hardware_state()

Performs a forced synchronization with the hardware state. This function is called automatically after the rendering context has been created and does not actually need to be used any further, perhaps after resetting the rendering device, that’s it.

bool begin_scene()

Begins a scene.

bool end_scene()

Ends a scene that was begun by calling begin_scene.

bool clear(ClearFlags clear_flags, const Color &color, float depth, unsigned stencil)

Clears the currently bound render target(s).

bool draw()

Draws non-indexed, non-instanced primitives.

bool draw(meshes::Topology topology, unsigned primitive_count, unsigned start_vertex = 0)

Draws non-indexed, non-instanced primitives.

bool draw_indexed()

Draws indexed, non-instanced primitives.

bool draw_indexed(meshes::Topology topology, unsigned primitive_count, unsigned start_index = 0, signed base_vertex = 0)

Draws indexed, non-instanced primitives.

Public Members

pipeline::Pipeline pipeline

The rendering pipeline and its stages.

Protected Functions

RenderingContext(RenderingDevice *rendering_device, unsigned index)

Explicit constructor.

virtual ~RenderingContext() = default

Private Functions

virtual bool _synchronize_hardware_state_impl() = 0

Performs a forced synchronization with the hardware state.

virtual bool _begin_scene_impl() = 0

Begins a scene.

virtual bool _end_scene_impl() = 0

Ends a scene that was begun by calling begin_scene.

virtual bool _clear_impl(const ResolvedTargetStates &resolved_target_states, ClearFlags clear_flags, const Color &color, float depth, unsigned stencil) = 0

Clears the currently bound render target(s).

virtual bool _draw_impl(const ResolvedDrawStates &resolved_draw_states, unsigned primitive_count, unsigned start_vertex) = 0

Draws non-indexed, non-instanced primitives.

virtual bool _draw_indexed_impl(const ResolvedDrawStates &resolved_draw_states, unsigned primitive_count, unsigned start_index, signed base_vertex) = 0

Draws indexed, non-instanced primitives.

void _resolve_target_states(ResolvedTargetStates &resolved_target_states)

Gathers render targets (including resolving resource IDs into usable objects).

void _resolve_draw_states(ResolvedDrawStates &resolved_draw_states, bool indexed, bool instanced)

Gathers drawing states (including resolving resource IDs into usable objects).

Private Members

RenderingDevice *const _rendering_device

The owning rendering device.

const unsigned _index

The 0-based index of the context (0: primary context).

bool _the_scene_is_on

The flag indicating whether the function begin_scene has been called without a following call to end_scene.

Private Static Functions

static bool _validate_resolved_draw_states(const ResolvedDrawStates &resolved_draw_states, bool indexed, bool instanced)

Validates the specified drawing states.

Friends

template<class TShader>
friend void _resolve_shader_states(RenderingDevice *_rendering_device, RenderingContext::ResolvedShaderStates<TShader> &resolved_shader_states, pipeline::AbstractShaderStage &pipeline_as)
class RenderingContextImpl : public xl7::graphics::RenderingContext

Public Functions

RenderingContextImpl() = delete
RenderingContextImpl(const RenderingContextImpl&) = delete
RenderingContextImpl &operator=(const RenderingContextImpl&) = delete
RenderingContextImpl(RenderingContextImpl&&) = delete
RenderingContextImpl &operator=(RenderingContextImpl&&) = delete
inline ID3D11DeviceContextN *get_raw_d3d_device_context() const

Returns the Direct3D 11 device context interface.

Protected Functions

RenderingContextImpl(RenderingDeviceImpl *rendering_device, unsigned index, wrl::ComPtr<ID3D11DeviceContextN> d3d_device_context, wrl::ComPtr<ID3D11RenderTargetView> d3d_render_target_view, wrl::ComPtr<ID3D11DepthStencilView> d3d_depth_stencil_view)
~RenderingContextImpl() override = default

Private Functions

virtual bool _synchronize_hardware_state_impl() override

Performs a forced synchronization with the hardware state.

virtual bool _begin_scene_impl() override

Begins a scene.

virtual bool _end_scene_impl() override

Ends a scene that was begun by calling begin_scene.

virtual bool _clear_impl(const ResolvedTargetStates &resolved_target_states, ClearFlags clear_flags, const Color &color, float depth, unsigned stencil) override

Clears the currently bound render target(s).

virtual bool _draw_impl(const ResolvedDrawStates &resolved_draw_states, unsigned primitive_count, unsigned start_vertex) override

Draws non-indexed, non-instanced primitives.

virtual bool _draw_indexed_impl(const ResolvedDrawStates &resolved_draw_states, unsigned primitive_count, unsigned start_index, signed base_vertex) override

Draws indexed, non-instanced primitives.

bool _flush_target_states(const ResolvedTargetStates &resolved_target_states)

Transfers the current render target states to the device if necessary.

bool _flush_draw_states(const ResolvedDrawStates &resolved_draw_states)

Transfers all current draw states to the device if necessary.

bool _prepare_shader_constant_states(const ResolvedAbstractShaderStates &resolved_shader_states, HardwareStates::AbstractShaderStates &hardware_shader_states)

Gathers/prepares the current states for the indirectly/implicitly specified shader.

bool _flush_temp_constant_buffer_data()

Transfers the prepared constant buffer states to the device if necessary.

bool _flush_constant_buffer_states(HardwareStates::AbstractShaderStates &hardware_shader_states, void (ID3D11DeviceContextN::* SetConstantBuffers)(unsigned, unsigned, ID3D11Buffer*const*))

Transfers the prepared constant buffer states for the indirectly/implicitly specified shader to the device if necessary.

bool _flush_texture_sampler_states(const ResolvedTextureSamplerStates &resolved_texture_sampler_states, HardwareStates::TextureSamplerStates &hardware_texture_sampler_states, void (ID3D11DeviceContextN::* SetShaderResources)(unsigned, unsigned, ID3D11ShaderResourceView*const*), void (ID3D11DeviceContextN::* SetSamplers)(unsigned, unsigned, ID3D11SamplerState*const*))

Transfers the current texture/samper states for the indirectly/implicitly specified shader to the device if necessary.

Private Members

wrl::ComPtr<ID3D11DeviceContextN> _d3d_device_context

The Direct3D 11 device context interface.

wrl::ComPtr<ID3D11RenderTargetView> _d3d_render_target_view

The Direct3D 11 (standard) render target view interface.

wrl::ComPtr<ID3D11DepthStencilView> _d3d_depth_stencil_view

The Direct3D 11 (standard) depth/stencil view interface.

HardwareStates hardware_states
std::vector<shaders::D3DConstantBufferWrapper*> _temp_d3d_constant_buffer_wrappers

Friends

friend class RenderingDeviceImpl
class RenderingContextImpl : public xl7::graphics::RenderingContext

Public Functions

RenderingContextImpl() = delete
RenderingContextImpl(const RenderingContextImpl&) = delete
RenderingContextImpl &operator=(const RenderingContextImpl&) = delete
RenderingContextImpl(RenderingContextImpl&&) = delete
RenderingContextImpl &operator=(RenderingContextImpl&&) = delete
inline IDirect3DDevice9 *get_raw_d3d_device() const

Returns the Direct3D 9 device interface.

Protected Functions

RenderingContextImpl(RenderingDeviceImpl *rendering_device, unsigned index, wrl::ComPtr<IDirect3DDevice9> d3d_device, wrl::ComPtr<IDirect3DSurface9> d3d_render_target_surface, wrl::ComPtr<IDirect3DSurface9> d3d_depth_stencil_surface)
~RenderingContextImpl() override = default

Private Functions

virtual bool _synchronize_hardware_state_impl() override

Performs a forced synchronization with the hardware state.

virtual bool _begin_scene_impl() override

Begins a scene.

virtual bool _end_scene_impl() override

Ends a scene that was begun by calling begin_scene.

virtual bool _clear_impl(const ResolvedTargetStates &resolved_target_states, ClearFlags clear_flags, const Color &color, float depth, unsigned stencil) override

Clears the currently bound render target(s).

virtual bool _draw_impl(const ResolvedDrawStates &resolved_draw_states, unsigned primitive_count, unsigned start_vertex) override

Draws non-indexed, non-instanced primitives.

virtual bool _draw_indexed_impl(const ResolvedDrawStates &resolved_draw_states, unsigned primitive_count, unsigned start_index, signed base_vertex) override

Draws indexed, non-instanced primitives.

bool _flush_target_states(const ResolvedTargetStates &resolved_target_states)

Transfers the current render target states to the device if necessary.

bool _flush_draw_states(const ResolvedDrawStates &resolved_draw_states)

Transfers all current draw states to the device if necessary.

bool _flush_shader_constant_states(const ResolvedAbstractShaderStates &resolved_shader_states, HardwareStates::AbstractShaderStates &hardware_shader_states, HRESULT (IDirect3DDevice9::* SetShaderConstantF)(UINT, const float*, UINT), HRESULT (IDirect3DDevice9::* SetShaderConstantI)(UINT, const int*, UINT), HRESULT (IDirect3DDevice9::* SetShaderConstantB)(UINT, const BOOL*, UINT))

Transfers the current shader constant states for the indirectly/implicitly specified shader to the device if necessary.

bool _flush_texture_sampler_states(const ResolvedTextureSamplerStates &resolved_texture_sampler_states, HardwareStates::TextureSamplerStates &hardware_texture_sampler_states, unsigned max_stage_count, unsigned stage_base)

Transfers the current texture/sampler states for the indirectly/implicitly specified shader to the device if necessary.

IDirect3DVertexDeclaration9 *_find_d3d_vertex_declaration(const shared::meshes::VertexBufferBinding &vertex_buffer_binding)

Tries to find a suitable Direct3D 9 vertex declaration based on the currently set vertex buffer(s).

IDirect3DVertexDeclaration9 *_find_or_create_d3d_vertex_declaration(const shared::meshes::VertexBufferBinding &vertex_buffer_binding)

Tries to find a suitable Direct3D 9 vertex declaration, and otherwise creates a new one, both based on the vertex layout(s) of the currently set vertex buffer(s).

Private Members

wrl::ComPtr<IDirect3DDevice9> _d3d_device

The Direct3D 9 device interface.

wrl::ComPtr<IDirect3DSurface9> _d3d_render_target_surface

The Direct3D 9 (standard) render target surface interface.

wrl::ComPtr<IDirect3DSurface9> _d3d_depth_stencil_surface

The Direct3D 9 (standard) depth/stencil surface interface.

HardwareStates hardware_states
std::unordered_map<shared::meshes::VertexBufferBinding, wrl::ComPtr<IDirect3DVertexDeclaration9>> _d3d_vertex_declarations_by_binding
std::unordered_map<shared::meshes::ComposedVertexLayout, wrl::ComPtr<IDirect3DVertexDeclaration9>> _d3d_vertex_declarations_by_layout
cl7::byte_vector _temp_constant_data

Friends

friend class RenderingDeviceImpl
class RenderingDevice
#include <RenderingDevice.h>

Subclassed by xl7::graphics::impl::direct3d11::RenderingDeviceImpl, xl7::graphics::impl::direct3d9::RenderingDeviceImpl

Public Functions

RenderingDevice() = delete
RenderingDevice(const RenderingDevice&) = delete
RenderingDevice &operator=(const RenderingDevice&) = delete
RenderingDevice(RenderingDevice&&) = delete
RenderingDevice &operator=(RenderingDevice&&) = delete
inline unsigned get_back_buffer_width() const

Returns the width of the (default) back buffer, in pixels.

inline unsigned get_back_buffer_height() const

Returns the height of the (default) back buffer, in pixels.

inline const Viewport &get_default_viewport() const

Returns the default viewport based on the size of the (default) back buffer.

inline const Capabilities &get_capabilities() const

Returns the capabilities of the rendering device (as far as they can be determined).

inline RenderingContext *get_primary_context() const

Returns the primary rendering context.

RenderingContext *get_rendering_context(unsigned index = 0)

Returns the specified rendering context (0: primary context).

Returns the specified rendering context.

template<class TRenderingContextImpl>
inline TRenderingContextImpl *get_primary_context_impl() const

Returns the primary rendering context implementation.

template<class TRenderingContextImpl>
inline TRenderingContextImpl *get_rendering_context_impl(unsigned index = 0)

Returns the specified rendering context implementation (0: primary context).

inline surfaces::SurfaceManager *get_surface_manager() const

Returns the surface manager.

inline textures::TextureManager *get_texture_manager() const

Returns the texture manager.

inline meshes::MeshManager *get_mesh_manager() const

Returns the mesh manager.

inline shaders::ShaderManager *get_shader_manager() const

Returns the shader manager.

inline states::StateManager *get_state_manager() const

Returns the state manager.

bool check_device_lost()

Checks whether the device is lost. If so, true is returned, and the application should pause and periodically call handle_device_lost. Reasons for a lost device could be:

  • A full-screen application loses focus.

  • The graphics driver is upgraded.

  • The system changes from a power-saving adapter to a performance adapter.

  • The graphics device stops responding and is reset.

  • A graphics adapter is physically attached or removed.

  • The swap chain has been resized.

  • The app has been moved to a monitor attached to a difference adapter.

  • The device has entered a non-operational state, for whatever reason.

bool handle_device_lost()

If the device is lost (see check_device_lost), the application should pause and periodically call handle_device_lost to attempt to reset/reinitialize the device and restore/reacquire/recreate the device-dependent resources. If the device has been restored to an operational state, true is returned.

bool present()

Presents the contents of the next buffer in the device’s swap chain.

bool check_texture_format(textures::Texture::Type texture_type, PixelFormat pixel_format, ChannelOrder channel_order)

Checks whether the device (generally) supports the specified combination of pixel format and channel order for the specified texture type.

std::pair<ChannelOrder, bool> recommend_channel_order(textures::Texture::Type texture_type, PixelFormat pixel_format, ChannelOrder preferred_channel_order)

Returns the channel order that is most likely to be accepted by the device for the specified texture type of a specific pixel format. However, there is no guarantee that the implied combination will actually be accepted (e.g., if the pixel format is not supported at all). The secondary return value may provide information about this.

Protected Types

template<class TResourceManager>
using ResourceManagerPtr = std::unique_ptr<TResourceManager, std::function<void(TResourceManager*)>>
using SurfaceManagerPtr = ResourceManagerPtr<surfaces::SurfaceManager>
using TextureManagerPtr = ResourceManagerPtr<textures::TextureManager>
using MeshManagerPtr = ResourceManagerPtr<meshes::MeshManager>
using ShaderManagerPtr = ResourceManagerPtr<shaders::ShaderManager>
using StateManagerPtr = ResourceManagerPtr<states::StateManager>

Protected Functions

RenderingDevice(std::unique_ptr<IResourceFactory> resource_factory)

Explicit constructor.

virtual ~RenderingDevice() = default
void _notify_device_lost()

Notifies about a “device lost” state.

Private Functions

virtual bool _init_impl(Capabilities &capabilities) = 0

Initializes the rendering device and determines the capabilities (as far as they can be determined).

virtual bool _shutdown_impl() = 0

De-initializes the rendering device.

virtual RenderingContext *_create_rendering_context_impl(unsigned index) = 0

Creates a new rendering context with the specified index (0: primary context). Returns NULL if the rendering context could not be created.

virtual bool _check_device_lost_impl() = 0

Checks whether the device is lost. If so, true is returned.

virtual bool _handle_device_lost_impl() = 0

Tries to reset/reinitialize the device after it has been lost. If the device has been restored to an operational state, true is returned.

virtual bool _present_impl() = 0

Presents the contents of the next buffer in the device’s swap chain.

virtual bool _check_texture_format_impl(textures::Texture::Type texture_type, PixelFormat pixel_format, ChannelOrder channel_order) = 0

Checks whether the device (generally) supports the specified combination of pixel format and channel order for the specified texture type.

bool _init()

Initializes the rendering device.

bool _shutdown()

De-initializes the rendering device.

Private Members

unsigned _back_buffer_width

The width of the (default) back buffer, in pixels.

unsigned _back_buffer_height

The height of the (default) back buffer, in pixels.

Viewport _default_viewport

The default viewport based on the size of the (default) back buffer.

Capabilities _capabilities

The capabilities of the rendering device (as far as they can be determined).

std::vector<std::unique_ptr<RenderingContext, std::function<void(RenderingContext*)>>> _rendering_contexts

The rendering contexts.

std::unique_ptr<IResourceFactory> _resource_factory

The central resource factory for the resource managers.

SurfaceManagerPtr _surface_manager

The surface manager.

TextureManagerPtr _texture_manager

The texture manager.

MeshManagerPtr _mesh_manager

The mesh manager.

ShaderManagerPtr _shader_manager

The shader manager.

StateManagerPtr _state_manager

The state manager.

bool _device_lost

The flag indicating whether the device was lost.

class RenderingDeviceImpl : public xl7::graphics::RenderingDevice

Public Functions

RenderingDeviceImpl(const RenderingDeviceImpl&) = delete
RenderingDeviceImpl &operator=(const RenderingDeviceImpl&) = delete
RenderingDeviceImpl(RenderingDeviceImpl&&) = delete
RenderingDeviceImpl &operator=(RenderingDeviceImpl&&) = delete
inline ID3D11DeviceN *get_raw_d3d_device() const

Returns the Direct3D 11 device interface.

inline const D3D_FEATURE_LEVEL &get_d3d_feature_level() const

Returns the set of features targeted by the Direct3D 11 device.

ID3D11InputLayout *_find_d3d_input_layout(const shared::meshes::VertexBufferBinding &vertex_buffer_binding)

Tries to find a suitable Direct3D 11 input layout based on the currently set vertex buffer(s).

ID3D11InputLayout *_find_or_create_d3d_input_layout(const shared::meshes::VertexBufferBinding &vertex_buffer_binding, const void *shader_bytecode_with_input_signature, size_t bytecode_length)

Tries to find a suitable Direct3D 11 input layout, and otherwise creates a new one, both based on the vertex layout(s) of the currently set vertex buffer(s).

std::span<shaders::D3DConstantBufferWrapper*> _find_or_create_d3d_constant_buffers(resources::ResourceID shader_id)

Tries to find actual Direct3D 11 constant buffers for the specified shader, and otherwise creates some.

void _release_d3d_constant_buffers(resources::ResourceID shader_id)

Releases the actual Direct3D 11 constant buffers associated with the specified shader.

Protected Functions

RenderingDeviceImpl()
~RenderingDeviceImpl() override = default

Private Functions

virtual bool _init_impl(Capabilities &capabilities) override

Initializes the rendering device and determines the capabilities (as far as they can be determined).

virtual bool _shutdown_impl() override

De-initializes the component.

virtual RenderingContext *_create_rendering_context_impl(unsigned index) override

Creates a new rendering context with the specified index (0: primary context). Returns NULL if the rendering context could not be created.

virtual bool _check_device_lost_impl() override

Checks whether the device is lost. If so, true is returned.

virtual bool _handle_device_lost_impl() override

Tries to reset/reinitialize the device after it has been lost. If the device has been restored to an operational state, true is returned.

virtual bool _present_impl() override

Presents the contents of the next buffer in the device’s swap chain.

virtual bool _check_texture_format_impl(xl7::graphics::textures::Texture::Type texture_type, PixelFormat pixel_format, ChannelOrder channel_order) override

Checks whether the device (generally) supports the specified combination of pixel format and channel order for the specified texture type.

shaders::D3DConstantBufferWrapper *_find_d3d_constant_buffer(const xl7::graphics::shaders::ConstantBufferLayout &constant_buffer_layout)

Tries to find an actual Direct3D 11 constant buffer that matches the specified layout.

shaders::D3DConstantBufferWrapper *_find_or_create_d3d_constant_buffer(const xl7::graphics::shaders::ConstantBufferLayout &constant_buffer_layout)

Tries to find an actual Direct3D 11 constant buffer that matches the specified layout, otherwise creates a new one based on said layout.

Private Members

wrl::ComPtr<ID3D11DeviceN> _d3d_device

The Direct3D 11 device interface.

D3D_FEATURE_LEVEL _d3d_feature_level

The set of features targeted by the Direct3D 11 device.

wrl::ComPtr<IDXGISwapChainN> _dxgi_swap_chain

The DXGI swap chain interface.

wrl::ComPtr<ID3D11DeviceContextN> _d3d_immediate_context

The Direct3D 11 (immediate) device context interface.

wrl::ComPtr<ID3D11RenderTargetView> _d3d_render_target_view

The Direct3D 11 (standard) render target view interface.

wrl::ComPtr<ID3D11DepthStencilView> _d3d_depth_stencil_view

The Direct3D 11 (standard) depth/stencil view interface.

std::unordered_map<shared::meshes::VertexBufferBinding, wrl::ComPtr<ID3D11InputLayout>> _d3d_input_layouts_by_binding
std::unordered_map<shared::meshes::ComposedVertexLayout, wrl::ComPtr<ID3D11InputLayout>> _d3d_input_layouts_by_layout
std::vector<std::unique_ptr<shaders::D3DConstantBufferWrapper>> _d3d_constant_buffer_registry
std::unordered_map<resources::ResourceID, std::vector<shaders::D3DConstantBufferWrapper*>> _d3d_constant_buffers_by_shader_id

Friends

friend class GraphicsSystemImpl
class RenderingDeviceImpl : public xl7::graphics::RenderingDevice

Public Functions

RenderingDeviceImpl(const RenderingDeviceImpl&) = delete
RenderingDeviceImpl &operator=(const RenderingDeviceImpl&) = delete
RenderingDeviceImpl(RenderingDeviceImpl&&) = delete
RenderingDeviceImpl &operator=(RenderingDeviceImpl&&) = delete
inline IDirect3DDevice9 *get_raw_d3d_device() const

Returns the Direct3D 9 device interface.

inline const D3DADAPTER_IDENTIFIER9 &get_d3d_adapter_identifier() const

Returns the structure containing information identifying the adapter.

inline const D3DPRESENT_PARAMETERS &get_d3d_present_parameters() const

Returns the Direct3D 9 presentation parameters.

inline const D3DCAPS9 &get_d3d_device_caps() const

Returns the capabilities of the underlying hardware.

Protected Functions

RenderingDeviceImpl()
~RenderingDeviceImpl() override = default

Private Functions

virtual bool _init_impl(Capabilities &capabilities) override

Initializes the rendering device and determines the capabilities (as far as they can be determined).

virtual bool _shutdown_impl() override

De-initializes the component.

virtual RenderingContext *_create_rendering_context_impl(unsigned index) override

Creates a new rendering context with the specified index (0: primary context). Returns NULL if the rendering context could not be created.

virtual bool _check_device_lost_impl() override

Checks whether the device is lost. If so, true is returned.

virtual bool _handle_device_lost_impl() override

Tries to reset/reinitialize the device after it has been lost. If the device has been restored to an operational state, true is returned.

virtual bool _present_impl() override

Presents the contents of the next buffer in the device’s swap chain.

virtual bool _check_texture_format_impl(xl7::graphics::textures::Texture::Type texture_type, PixelFormat pixel_format, ChannelOrder channel_order) override

Checks whether the device (generally) supports the specified combination of pixel format and channel order for the specified texture type.

bool _determine_video_memory(Capabilities::Memory &memory_capabilities)

Tries to determine the available video memory composition.

Private Members

wrl::ComPtr<IDirect3DDevice9> _d3d_device

The Direct3D 9 device interface.

D3DADAPTER_IDENTIFIER9 _d3d_adapter_identifier

The structure containing information identifying the adapter.

D3DPRESENT_PARAMETERS _d3d_present_parameters

The Direct3D 9 presentation parameters.

D3DCAPS9 _d3d_device_caps

The capabilities of the underlying hardware.

wrl::ComPtr<IDirect3DSurface9> _d3d_render_target_surface

The Direct3D 9 (standard) render target surface interface.

wrl::ComPtr<IDirect3DSurface9> _d3d_depth_stencil_surface

The Direct3D 9 (standard) depth/stencil surface interface.

Friends

friend class GraphicsSystemImpl
class RenderTarget : public xl7::graphics::surfaces::Surface
#include <RenderTarget.h>

Subclassed by xl7::graphics::surfaces::ColorRenderTarget, xl7::graphics::surfaces::DepthStencilTarget

Public Functions

XL7_DERIVE_RESOURCE_ID(Surface)
RenderTarget() = delete
RenderTarget(const RenderTarget&) = delete
RenderTarget &operator=(const RenderTarget&) = delete
RenderTarget(RenderTarget&&) = delete
RenderTarget &operator=(RenderTarget&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline const Viewport &get_default_viewport() const

Returns the default viewport based on the size of the render target.

Protected Functions

inline RenderTarget(Type type, const CreateParams<Desc> &params)
~RenderTarget() override = default

Private Members

const Viewport _default_viewport

The default viewport based on the size of the render target.

class Reporter
#include <Reporter.h>

Public Functions

void add_listener(signed priority, reporting::IListener *listener)

(Re-)adds the specified listener.

void remove_listener(const reporting::IListener *listener)

Removes the specified listener.

void post_start_run(size_t count)

Posts the start of a new test run by notifying registered listeners, providing the total number of test cases (multiple executions/branches due to subcases etc. are not taken into account here).

void post_start_case(const Meta &meta)

Posts the start of the specified test case by notifying registered listeners.

void post_result(const Result &result)

Posts the specified result by notifying registered listeners.

void post_end_case(const Stats &stats)

Posts the specified (test case) stats at the end of a test case by notifying registered listeners.

void post_end_run(const Stats &stats)

Posts the specified (final) stats at the end of a test run by notifying registered listeners.

Posts the specified stats by notifying registered listeners.

Private Members

std::vector<ListenerEntry> _listeners

The registered listeners.

Private Static Attributes

static unsigned consecutive_number = 0

The sequential number assigned to newly registered listeners.

struct ResolvedAbstractShaderStates : public xl7::graphics::RenderingContext::ResolvedTextureSamplerStates
#include <RenderingContext.h>

Subclassed by xl7::graphics::RenderingContext::ResolvedShaderStates< xl7::graphics::shaders::VertexShader >, xl7::graphics::RenderingContext::ResolvedShaderStates< xl7::graphics::shaders::PixelShader >, xl7::graphics::RenderingContext::ResolvedShaderStates< TShader >

Public Members

unsigned constant_buffer_count
const shaders::ConstantBuffer *constant_buffers[pipeline::AbstractShaderStage::MAX_CONSTANT_BUFFER_SLOTS]
const shaders::ConstantBufferMapping *constant_buffer_mappings[pipeline::AbstractShaderStage::MAX_CONSTANT_BUFFER_SLOTS]
const shaders::Shader *abstract_shader
struct ResolvedDrawStates : public xl7::graphics::RenderingContext::ResolvedTargetStates
#include <RenderingContext.h>

Public Members

unsigned stream_count
const meshes::VertexBuffer *vertex_buffers[pipeline::InputAssemblerStage::MAX_VERTEX_STREAMS]
const meshes::IndexBuffer *index_buffer
meshes::Topology topology
ResolvedShaderStates<shaders::VertexShader> vs
ResolvedShaderStates<shaders::PixelShader> ps
Viewport viewport
const states::RasterizerState *rasterizer_state
const states::DepthStencilState *depth_stencil_state
const states::BlendState *blend_state
unsigned stencil_reference_value
Color blend_factor
template<class TShader>
struct ResolvedShaderStates : public xl7::graphics::RenderingContext::ResolvedAbstractShaderStates
#include <RenderingContext.h>

Public Members

const TShader *shader
struct ResolvedTargetStates
#include <RenderingContext.h>

Draws non-indexed, instanced primitives. Draws indexed, instanced primitives.

Subclassed by xl7::graphics::RenderingContext::ResolvedDrawStates

Public Members

unsigned target_count
const surfaces::ColorRenderTarget *color_render_targets[pipeline::OutputMergerStage::MAX_RENDER_TARGETS]
const surfaces::DepthStencilTarget *depth_stencil_target
struct ResolvedTextureSamplerStates
#include <RenderingContext.h>

Subclassed by xl7::graphics::RenderingContext::ResolvedAbstractShaderStates

Public Members

unsigned texture_sampler_count
const textures::Texture *textures[pipeline::AbstractShaderStage::MAX_TEXTURE_SAMPLER_SLOTS]
const states::SamplerState *sampler_states[pipeline::AbstractShaderStage::MAX_TEXTURE_SAMPLER_SLOTS]
class Resource
#include <Resource.h>

Subclassed by xl7::graphics::meshes::MeshBuffer, xl7::graphics::shaders::ConstantBuffer, xl7::graphics::shaders::Shader, xl7::graphics::states::AbstractState, xl7::graphics::surfaces::Surface, xl7::graphics::textures::Texture

Public Functions

Resource() = delete
Resource(const Resource&) = delete
Resource &operator=(const Resource&) = delete
Resource(Resource&&) = delete
Resource &operator=(Resource&&) = delete
inline virtual cl7::u8string_view get_type_string() const

Returns the specific type of the resource, as a “human-friendly” string.

cl7::u8string get_identifier_string() const

Returns the identifier of this resource (if specified, empty otherwise).

inline cl7::u8string get_typed_identifier_string() const

Returns the specific type of the resource, as a “human-friendly” string.

void add_reference()

Increases the reference count. A call to this function should be paired with a call to the release function (or one of the manager’s release functions).

void release()

Releases the resource. If the reference count reaches zero, the resource is actually disposed/”unacquired” (and removed from its owning manager), thereby rendering it unusable. Time complexity: linear in the number of contained resources of the owning manager.

template<class T>
inline T *get_raw_resource() const

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

inline ResourceManager *get_manager() const

Returns the resource manager responsible for this resource.

inline ResourceID get_id() const

Returns the ID of this resource.

template<class TResourceID>
inline TResourceID get_id() const

Returns the ID of this resource.

inline const cl7::u8string &get_identifier() const

Returns the identifier of this resource (if specified, empty otherwise).

inline unsigned get_reference_count() const

Returns the reference count to determine whether the resource should actually be disposed/”unacquired” when released.

inline bool is_usable() const

Indicates whether this resource is ready for use (i.e., it is managed by its owning manager and has been successfully acquired).

inline cl7::byte_view get_data() const

Returns the (optional) local copy of the resource data.

Protected Functions

Resource(ResourceManager *manager, ResourceID id, cl7::u8string_view identifier)

Explicit constructor.

template<class TDesc>
inline Resource(const CreateParams<TDesc> &params)
virtual ~Resource()

Destructor.

inline cl7::byte_vector &_access_data()

Provides mutable access to the (optional) local copy of the resource data.

bool _check_is_usable() const

Checks whether this resource is ready for use (i.e., it is managed by its owning manager and has been successfully acquired) and fires an error message if not.

bool _try_fill_data(const DataProvider &data_provider)

Checks whether the given data provider complies with the specific properties of the resource and, if so, (re)populates the local data buffer.

bool _check_against_size(const DataProvider &data_provider, size_t size) const

Checks whether the given data provider complies with the specified total data size and fires an error message if not.

bool _check_against_stride(const DataProvider &data_provider, size_t stride) const

Checks whether the given data provider complies with the specified data element/chunk size and fires an error message if not.

Private Functions

inline virtual void *_get_raw_resource_impl() const

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _check_data_impl(const DataProvider &data_provider) = 0

Checks whether the given data provider complies with the specific properties of the resource to (re)populate it, taking into account the current state of the resource if necessary.

virtual bool _fill_data_impl(const DataProvider &data_provider)

(Re)populates the local data buffer based on the given data provider.

virtual bool _acquire_impl(const DataProvider &data_provider) = 0

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _dispose_impl() = 0

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

bool _acquire(const DataProvider &data_provider)

Requests/acquires the resource, bringing it into a usable state (or not).

void _dispose()

Disposes/”unacquires” the resource, thereby rendering it unusable, indicating that it is no longer managed by its owning manager.

void _release()

Decreases the reference count. If it reaches zero, the resource is actually disposed/”unacquired”, thereby rendering it unusable, indicating that it is no longer managed by its owning manager.

Private Members

ResourceManager *const _manager

The resource manager that owns this resource.

const ResourceID _id

The ID of this resource.

const cl7::u8string _identifier

The textual identifier of this resource (if specified, empty otherwise).

unsigned _reference_count

The reference count to determine whether the resource should actually be disposed/”unacquired” when released.

bool _is_usable

The flag that indicates whether this resource is ready for use (i.e., it is managed by its owning manager and has been successfully acquired).

cl7::byte_vector _data

The (optional) local copy of the resource data.

struct ResourceEntry

Public Members

ResourceID id
ResourcePtr ptr
class ResourceFactoryImpl : public xl7::graphics::IResourceFactory

Public Functions

virtual xl7::graphics::textures::Texture2D *create_texture_2d(const resources::Resource::CreateParams<xl7::graphics::textures::Texture2D::Desc> &params) override
virtual xl7::graphics::textures::Texture3D *create_texture_3d(const resources::Resource::CreateParams<xl7::graphics::textures::Texture3D::Desc> &params) override
virtual xl7::graphics::textures::Texture2DArray *create_texture_2d_array(const resources::Resource::CreateParams<xl7::graphics::textures::Texture2DArray::Desc> &params) override
virtual xl7::graphics::textures::Cubemap *create_cubemap(const resources::Resource::CreateParams<xl7::graphics::textures::Cubemap::Desc> &params) override
virtual xl7::graphics::meshes::VertexBuffer *create_vertex_buffer(const resources::Resource::CreateParams<xl7::graphics::meshes::VertexBuffer::Desc> &params) override
virtual xl7::graphics::meshes::IndexBuffer *create_index_buffer(const resources::Resource::CreateParams<xl7::graphics::meshes::IndexBuffer::Desc> &params) override
virtual xl7::graphics::shaders::ConstantBuffer *create_constant_buffer(const resources::Resource::CreateParams<xl7::graphics::shaders::ConstantBuffer::Desc> &params) override
virtual xl7::graphics::shaders::VertexShader *create_vertex_shader(const resources::Resource::CreateParams<xl7::graphics::shaders::VertexShader::Desc> &params) override
virtual xl7::graphics::shaders::PixelShader *create_pixel_shader(const resources::Resource::CreateParams<xl7::graphics::shaders::VertexShader::Desc> &params) override
virtual xl7::graphics::states::SamplerState *create_sampler_state(const resources::Resource::CreateParams<xl7::graphics::states::SamplerState::Desc> &params) override
virtual xl7::graphics::states::RasterizerState *create_rasterizer_state(const resources::Resource::CreateParams<xl7::graphics::states::RasterizerState::Desc> &params) override
virtual xl7::graphics::states::DepthStencilState *create_depth_stencil_state(const resources::Resource::CreateParams<xl7::graphics::states::DepthStencilState::Desc> &params) override
virtual xl7::graphics::states::BlendState *create_blend_state(const resources::Resource::CreateParams<xl7::graphics::states::BlendState::Desc> &params) override
class ResourceFactoryImpl : public xl7::graphics::IResourceFactory

Public Functions

virtual xl7::graphics::textures::Texture2D *create_texture_2d(const resources::Resource::CreateParams<xl7::graphics::textures::Texture2D::Desc> &params) override
virtual xl7::graphics::textures::Texture3D *create_texture_3d(const resources::Resource::CreateParams<xl7::graphics::textures::Texture3D::Desc> &params) override
virtual xl7::graphics::textures::Texture2DArray *create_texture_2d_array(const resources::Resource::CreateParams<xl7::graphics::textures::Texture2DArray::Desc> &params) override
virtual xl7::graphics::textures::Cubemap *create_cubemap(const resources::Resource::CreateParams<xl7::graphics::textures::Cubemap::Desc> &params) override
virtual xl7::graphics::meshes::VertexBuffer *create_vertex_buffer(const resources::Resource::CreateParams<xl7::graphics::meshes::VertexBuffer::Desc> &params) override
virtual xl7::graphics::meshes::IndexBuffer *create_index_buffer(const resources::Resource::CreateParams<xl7::graphics::meshes::IndexBuffer::Desc> &params) override
virtual xl7::graphics::shaders::ConstantBuffer *create_constant_buffer(const resources::Resource::CreateParams<xl7::graphics::shaders::ConstantBuffer::Desc> &params) override
virtual xl7::graphics::shaders::VertexShader *create_vertex_shader(const resources::Resource::CreateParams<xl7::graphics::shaders::VertexShader::Desc> &params) override
virtual xl7::graphics::shaders::PixelShader *create_pixel_shader(const resources::Resource::CreateParams<xl7::graphics::shaders::VertexShader::Desc> &params) override
virtual xl7::graphics::states::SamplerState *create_sampler_state(const resources::Resource::CreateParams<xl7::graphics::states::SamplerState::Desc> &params) override
virtual xl7::graphics::states::RasterizerState *create_rasterizer_state(const resources::Resource::CreateParams<xl7::graphics::states::RasterizerState::Desc> &params) override
virtual xl7::graphics::states::DepthStencilState *create_depth_stencil_state(const resources::Resource::CreateParams<xl7::graphics::states::DepthStencilState::Desc> &params) override
virtual xl7::graphics::states::BlendState *create_blend_state(const resources::Resource::CreateParams<xl7::graphics::states::BlendState::Desc> &params) override
class ResourceID
#include <ResourceID.h>

Public Types

using id_t = size_t

Public Functions

ResourceID() noexcept

Creates an invalid resource ID.

ResourceID(size_t index, unsigned version)
bool is_valid() const noexcept

Returns true if the resource ID is valid, false otherwise.

inline id_t value() const noexcept

Returns the technical unsigned-integer representation of the resource ID.

size_t index() const noexcept

Returns the index part of the resource ID.

unsigned version() const noexcept

Extracts the version from the resource ID.

void invalidate() noexcept

Invalidates this resource ID.

inline operator bool() const noexcept
inline size_t hash() const noexcept

Public Static Attributes

static const ResourceID INVALID_ID = ResourceID()

Private Members

id_t _id

The ID composed of index and version.

Private Static Attributes

static constexpr auto TOTAL_SIZE_BITS = sizeof(id_t) * 8
static constexpr auto INDEX_SIZE_BITS = sizeof(id_t) == 4 ? 24 : TOTAL_SIZE_BITS / 2
static constexpr auto VERSION_SIZE_BITS = sizeof(id_t) * 8 - INDEX_SIZE_BITS
static constexpr id_t INDEX_MASK = (id_t{1} << INDEX_SIZE_BITS) - 1
static constexpr id_t VERSION_MASK = (id_t{1} << VERSION_SIZE_BITS) - 1
static constexpr auto VERSION_SHIFT = INDEX_SIZE_BITS
class ResourceManager
#include <ResourceManager.h>

Subclassed by xl7::graphics::meshes::MeshManager, xl7::graphics::shaders::ShaderManager, xl7::graphics::states::StateManager, xl7::graphics::surfaces::SurfaceManager, xl7::graphics::textures::TextureManager

Public Functions

ResourceManager(const ResourceManager&) = delete
ResourceManager &operator=(const ResourceManager&) = delete
ResourceManager(ResourceManager&&) = delete
ResourceManager &operator=(ResourceManager&&) = delete
size_t get_resource_count() const

Returns the number of contained resources in this resource manager.

bool contains_resource(const Resource *resource) const

Checks whether a given resource is contained in this resource manager. Time complexity: constant.

bool contains_resource(ResourceID id) const

Checks whether a resource with the given resource ID is contained in this resource manager. Time complexity: constant.

bool contains_resource(cl7::u8string_view identifier) const

Checks whether a resource with the given identifier is contained in this resource manager. Time complexity: constant on average, worst case linear in the number of contained resources.

Checks whether a resource with the given identifier is contained in this resource manager. Time complexity: linear in the number of contained resources.

Resource *get_resource(size_t index) const

Returns the resource identified by the given index. Time complexity: constant on average, worst case linear in the number of contained resources.

Resource *find_resource(ResourceID id) const

Returns the resource of the given ID. Time complexity: constant.

Resource *find_resource(cl7::u8string_view identifier) const

Returns the resource of the given identifier. Time complexity: constant on average, worst case linear in the number of contained resources.

template<class TResource>
inline TResource *get_resource(size_t index) const

Returns the resource identified by the given index. Time complexity: constant on average, worst case linear in the number of contained resources.

template<class TResource>
inline TResource *find_resource(ResourceID id) const

Returns the resource of the given ID. Time complexity: constant.

template<class TResource>
inline TResource *find_resource(cl7::u8string_view identifier) const

Returns the resource of the given identifier. Time complexity: constant on average, worst case linear in the number of contained resources.

bool release_resource(Resource *resource)

Releases the specified resource. If its reference count reaches zero, the resource is actually disposed/”unacquired” (and removed from this resource manager). Time complexity: constant.

bool release_resource(ResourceID id)

Releases the specified resource. If its reference count reaches zero, the resource is actually disposed/”unacquired” (and removed from this resource manager). Time complexity: constant.

bool release_resource_and_invalidate(ResourceID &id)

Releases the specified resource and invalidates the given ID. If the reference count reaches zero, the resource is actually disposed/”unacquired” (and removed from this resource manager). Time complexity: constant.

bool release_resource(cl7::u8string_view identifier)

Releases the specified resource. If its reference count reaches zero, the resource is actually disposed/”unacquired” (and removed from this resource manager). Time complexity: constant on average, worst case linear in the number of contained resources.

void dispose_resources()

Disposes/”unacquires” all managed resources (and removes them from this resource manager).

Protected Types

using ResourcePtr = std::unique_ptr<Resource, std::add_pointer_t<void(Resource*)>>

Protected Functions

ResourceManager() = default
virtual ~ResourceManager()
ResourceID _next_id() const

Generates and returns the next resource ID to use when adding a new resource.

ResourceID _try_acquire_and_add_resource(ResourcePtr resource_ptr, const DataProvider &data_provider)

Adds the given resource to this resource manager (and returns the ID of the resource), but only if it can be acquired in this process. Returns an invalid ID otherwise.

template<class TResourceID>
inline TResourceID _try_acquire_and_add_resource(ResourcePtr resource_ptr, const DataProvider &data_provider)

Adds the given resource to this resource manager (and returns the ID of the resource), but only if it can be acquired in this process. Returns an invalid ID otherwise.

Protected Static Functions

static void _destroy_resource(Resource *resource)

Destroys the resource via Resource::Attorney::destroy.

Private Functions

ResourceID _add_resource(ResourcePtr resource_ptr)

Adds the given resource to this resource manager. This operation does not request/acquire the resource. This must have happened successfully before. Returns the ID of the resource.

Private Members

std::vector<ResourceEntry> _resources

A “linear list” of the managed resources.

std::unordered_map<cl7::u8string_view, ResourceID> _resource_lookup

A lookup table that maps a given resource identifier to the corresponding resource ID.

std::vector<size_t> _free_indices

A “list” of indices that mark free entries in the “linear list”.

struct Result
#include <Result.h>

Public Types

enum class OriginType

Values:

enumerator Unknown
enumerator TestCase
enumerator Check
enumerator Presumption
enumerator Assertion
enumerator Exception
enum class Outcome

Values:

enumerator Failure
enumerator Success

Public Functions

Result() = default
inline bool is_success() const
inline bool is_failure() const

Public Members

OriginType origin_type = OriginType::Unknown

The test result’s origin type.

Outcome outcome = Outcome::Failure

The outcome of the test.

cl7::u8string original_expression

The original expression (or empty if not applicable).

cl7::u8string evaluated_expression

The evaluated expression (or empty if not applicable).

std::shared_ptr<cl7::u8string> data_string

The “stringification” of the underlying input data, of a subcase iteration for example (or NULL if not applicable).

Meta context_meta = {{}, "", 0}

The meta description of the respective test case/subcase branch.

Meta result_meta = {{}, "", 0}

The meta description of what the result is about and where it has been generated.

Public Static Functions

static inline Outcome make_outcome(bool success)
class ResultBuilder
#include <ResultBuilder.h>

Public Static Functions

static Result make_test_case_result(const Context &ctx, Result::Outcome outcome)
static Result make_check_result(const Context &ctx, cl7::u8string_view original_expression, cl7::u8string_view evaluated_expression, const char *file_path, unsigned line_number, Result::Outcome outcome)
static Result make_presumption_result(const Context &ctx, cl7::u8string_view original_expression, cl7::u8string_view evaluated_expression, const char *file_path, unsigned line_number, Result::Outcome outcome)
static Result make_assertion_result(const Context &ctx, cl7::u8string_view original_expression, cl7::u8string_view evaluated_expression, const char *file_path, unsigned line_number, Result::Outcome outcome)
static Result make_exception_result(const Context &ctx, cl7::u8string_view message, const char *file_path = nullptr, unsigned line_number = 0)

Private Static Functions

static Result _make_result(Result::OriginType origin_type, const Context &ctx, const char *file_path, unsigned line_number, Result::Outcome outcome)
static Result _make_result(Result::OriginType origin_type, const Context &ctx, cl7::u8string_view stringification, const char *file_path, unsigned line_number, Result::Outcome outcome)
static Result _make_result(Result::OriginType origin_type, const Context &ctx, cl7::u8string_view original_expression, cl7::u8string_view evaluated_expression, const char *file_path, unsigned line_number, Result::Outcome outcome)
struct Sample
#include <Sample.h>

Public Functions

inline Sample(cl7::u8string_view name, Sample *parent_sample = nullptr)

Public Members

const cl7::u8string name

The name of this sample.

Sample *const parent_sample

The immediate parent of this sample.

const unsigned parent_count

The number of parent samples.

bool is_open

The flag that indicates whether this sample is “open”, meaning it is currently being profiled.

bool is_profiled

The flag specifying whether this sample has been profiled during the current frame.

unsigned frame_usecs

The total time this sample has been executed during the current frame, in microseconds.

struct cl7::profiling::Sample frame
unsigned min_usecs

The minimum frame time, in microseconds.

unsigned max_usecs

The maximum frame time, in microseconds.

unsigned avg_usecs

The average frame time, in microseconds.

float min_pct

The minimum percentage of frame time taken up.

float max_pct

The maximum percentage of frame time taken up.

float avg_pct

The average percentage of frame time taken up.

unsigned data_count

The number of times values have been stored since sample creation/reset.

unsigned call_count

The number of times this sample has been executed (profiled).

struct cl7::profiling::Sample stats
struct SampleHandler
#include <SampleHandler.h>

Public Functions

void open_sample()
void close_sample()
void update_sample(unsigned frame_usecs)

Public Members

Sample *sample
Stopwatch stopwatch
class SamplerState : public xl7::graphics::states::AbstractState
#include <SamplerState.h>

Subclassed by xl7::graphics::impl::direct3d11::states::SamplerStateImpl, xl7::graphics::impl::direct3d9::states::SamplerStateImpl

Public Types

enum class MinMagFilterType

The filtering method to use when sampling for minification and magnification.

Values:

enumerator Point

Use point sampling.

enumerator Linear

Use linear interpolation.

enumerator Anisotropic

Use anisotropic interpolation.

enum class MipFilterType

The filtering method to use when sampling for mip-level sampling.

Values:

enumerator None

Disables mipmapping.

enumerator Point

Use point sampling.

enumerator Linear

Use linear interpolation.

enumerator Anisotropic

Use anisotropic interpolation.

enum class AddressMode

Identifies the technique for resolving texture coordinates that are outside of the boundaries of a texture.

Values:

enumerator Wrap

Tile the texture at every integer junction. For example, for values between 0 and 3, the texture is repeated three times.

enumerator Mirror

Flip the texture at every integer junction. For values between 0 and 1, for example, the texture is addressed normally; between 1 and 2, the texture is flipped (mirrored); between 2 and 3, the texture is normal again; and so on.

enumerator Clamp

Texture coordinates outside the range [0;1] are set to the texture color at 0 or 1, respectively.

enumerator Border

Texture coordinates outside the range [0;1] are set to the specified border color.

enumerator MirrorOnce

Takes the absolute value of the texture coordinate (thus, mirroring around 0), and then clamps to the maximum value.

Public Functions

XL7_DERIVE_RESOURCE_ID(AbstractState)
SamplerState() = delete
SamplerState(const SamplerState&) = delete
SamplerState &operator=(const SamplerState&) = delete
SamplerState(SamplerState&&) = delete
SamplerState &operator=(SamplerState&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline const Desc &get_desc() const

Returns the descriptor of the sampler state.

Protected Functions

inline SamplerState(const CreateParams<Desc> &params)
~SamplerState() override = default

Private Members

const Desc _desc

The descriptor of the sampler state.

class SamplerStateImpl : public xl7::graphics::states::SamplerState
#include <SamplerStateImpl.h>

Public Functions

SamplerStateImpl() = delete
SamplerStateImpl(const SamplerStateImpl&) = delete
SamplerStateImpl &operator=(const SamplerStateImpl&) = delete
SamplerStateImpl(SamplerStateImpl&&) = delete
SamplerStateImpl &operator=(SamplerStateImpl&&) = delete
inline ID3D11SamplerState *get_raw_d3d_sampler_state() const

Returns the Direct3D 11 sampler state interface.

Public Static Functions

static void map_d3d_values(const Desc &desc, D3D11_SAMPLER_DESC &d3d_sampler_desc)

Maps the specified sampler state descriptor to corresponding Direct3D 11 values and fills the given structure accordingly.

Protected Functions

SamplerStateImpl(const CreateParams<Desc> &params)
~SamplerStateImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _acquire_impl(const xl7::resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

Private Members

wrl::ComPtr<ID3D11SamplerState> _d3d_sampler_state

The Direct3D 11 sampler state interface.

class SamplerStateImpl : public xl7::graphics::states::SamplerState
#include <SamplerStateImpl.h>

Public Functions

SamplerStateImpl() = delete
SamplerStateImpl(const SamplerStateImpl&) = delete
SamplerStateImpl &operator=(const SamplerStateImpl&) = delete
SamplerStateImpl(SamplerStateImpl&&) = delete
SamplerStateImpl &operator=(SamplerStateImpl&&) = delete
inline const D3DSamplerStateTypeValues &get_d3d_sampler_state_type_values() const

Returns the Direct3D 9 sampler state type values.

Public Static Functions

static void map_d3d_values(const Desc &desc, D3DSamplerStateTypeValues &d3d_sampler_state_type_values)

Maps the specified sampler state descriptor to corresponding Direct3D 9 values and fills the given structure accordingly.

Protected Functions

SamplerStateImpl(const CreateParams<Desc> &params)

Explicit constructor.

~SamplerStateImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _acquire_impl(const xl7::resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

Private Members

D3DSamplerStateTypeValues _d3d_sampler_state_type_values

The Direct3D 9 sampler state type values.

struct Settings
#include <TestSuite.h>

Public Members

unsigned max_check_fail_count = 0

The maximum tolerated number of failed checks (0: no limit). If it is exceeded between two (sub)cases, test execution will not continue.

class Shader : public xl7::resources::Resource
#include <Shader.h>

Subclassed by xl7::graphics::shaders::PixelShader, xl7::graphics::shaders::VertexShader

Public Types

enum class Type

Values:

enumerator VertexShader
enumerator PixelShader

Public Functions

XL7_DECLARE_RESOURCE_ID()
Shader() = delete
Shader(const Shader&) = delete
Shader &operator=(const Shader&) = delete
Shader(Shader&&) = delete
Shader &operator=(Shader&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline Type get_type() const

Returns the type of the shader.

inline const Desc &get_desc() const

Returns the descriptor of the shader.

inline bool is_precompiled() const

Indicates whether the shader is precompiled (based on bytecode).

inline bool is_recompilable() const

Indicates whether the shader is precompiled (based on high-level code).

inline const ShaderCode &get_bytecode() const

Returns the compiled bytecode.

inline const ReflectionResult &get_reflection_result() const

Returns the reflection result, which includes parameter declarations etc.

bool recompile(const CompileOptions &compile_options)

Recompiles the shader code. This tends to result in the resource having to be completely recreated in the background.

(Re)compiles the shader code. This tends to result in the resource having to be completely recreated in the background.

const ConstantBufferMapping *find_or_create_constant_buffer_mapping(const ConstantBuffer *constant_buffer) const

Finds or creates the constant buffer mapping for the specified constant buffer based on the reflection result of this shader. Returns NULL if not applicable. The padded sizes of the constant declarations specified in the descriptor of the constant buffer should be set correctly to minimize the resulting mapping entries as much as possible.

const ConstantBufferDeclaration *find_constant_buffer_declaration(cl7::u8string_view constant_buffer_name) const

Searches for the specified constant buffer declaration and returns it if found, NULL otherwise.

std::pair<const ConstantBufferDeclaration*, const ConstantDeclaration*> find_constant_buffer_and_constant_declaration(cl7::u8string_view constant_name) const

Searches for the specified constant declaration and returns it along with the associated constant buffer declaration if found, NULL twice otherwise.

const TextureSamplerDeclaration *find_texture_sampler_declaration(cl7::u8string_view texture_sampler_name) const

Searches for the specified texture/sampler declaration and returns it if found, NULL otherwise.

Protected Functions

Shader(Type type, const CreateParams<Desc> &params)

Explicit constructor.

~Shader() override = default
cl7::u8string _cascade_entry_point(const CompileOptions &compile_options) const

Returns the effective name of the entry point for (re)compiling the shader.

bool _reflect_and_validate(const ShaderCode &bytecode, ReflectionResult &reflection_result_out)

Performs a “reflection” on the (compiled) shader bytecode to determine parameter declarations etc. and validates the result.

Protected Static Functions

static bool _validate_reflection_result(const ReflectionResult &reflection_result)

Validates the given reflection result.

Private Functions

virtual bool _acquire_precompiled_impl(const CodeDataProvider &code_data_provider) = 0

Requests/acquires a precompiled shader resource. The actual code of the given code provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included as it contains additional implementation-specific information.

virtual bool _acquire_recompilable_impl(const CodeDataProvider &code_data_provider, ShaderCode &bytecode_out) = 0

Requests/acquires a recompilable shader resource. The actual code of the given code provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included as it contains additional implementation-specific information.

virtual bool _recompile_impl(const CompileOptions &compile_options, ShaderCode &bytecode_out) = 0

Recompiles the shader code. This tends to result in the resource having to be completely recreated in the background.

virtual bool _reflect_impl(const ShaderCode &bytecode, ReflectionResult &reflection_result_out) = 0

Performs a “reflection” on the (compiled) shader bytecode to determine parameter declarations etc.

virtual bool _check_data_impl(const resources::DataProvider &data_provider) override

Checks whether the given data provider complies with the specific properties of the resource to (re)populate it, taking into account the current state of the resource if necessary.

virtual bool _acquire_impl(const resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

Private Members

const Type _type

The type of the shader.

const Desc _desc

The descriptor of the shader.

ShaderCode _bytecode

The compiled bytecode.

ReflectionResult _reflection_result

The reflection result, which includes parameter declarations etc.

mutable std::unordered_map<resources::ResourceID, ConstantBufferMapping> _constant_buffer_mappings_by_constant_buffer_id

The constant buffer mappings cached so far by constant buffer ID.

class ShaderCode
#include <ShaderCode.h>

Public Types

enum class Language

Values:

enumerator Unknown
enumerator Bytecode
enumerator HighLevel

Public Functions

ShaderCode() = default
ShaderCode(Language language, cl7::byte_view code_data)
ShaderCode(cl7::u8string_view high_level_code)
inline Language get_language() const

Returns the language in which the code is given.

inline const cl7::byte_vector &get_code_data() const

Returns the actual code data.

Private Members

Language _language = Language::Unknown

The language in which the code is given.

cl7::byte_vector _code_data

The actual code data.

class ShaderManager : public xl7::resources::ResourceManager
#include <ShaderManager.h>

Public Functions

ShaderManager() = delete
ShaderManager(const ShaderManager&) = delete
ShaderManager &operator=(const ShaderManager&) = delete
ShaderManager(ShaderManager&&) = delete
ShaderManager &operator=(ShaderManager&&) = delete
ConstantBuffer::ID create_constant_buffer(cl7::u8string_view identifier, const ConstantBuffer::Desc &desc, const ConstantDataProvider &constant_data_provider = {})

Creates and acquires the specified constant buffer.

VertexShader::ID create_vertex_shader (cl7::u8string_view identifier, const CodeDataProvider &code_data_provider, cl7::u8string_view entry_point=u8"")

Creates and acquires the specified vertex shader. The name of the shader entry point can be empty, especially for precompiled shaders; a standard name is then used for (re)compilable shaders.

PixelShader::ID create_pixel_shader (cl7::u8string_view identifier, const CodeDataProvider &code_data_provider, cl7::u8string_view entry_point=u8"")

Creates and acquires the specified pixel shader. The name of the shader entry point can be empty, especially for precompiled shaders; a standard name is then used for (re)compilable shaders.

Protected Functions

inline ShaderManager(IShaderFactory *factory)
~ShaderManager() override = default

Private Members

IShaderFactory *const _factory

The shader factory.

template<class TD3D11Shader>
struct ShaderStates : public xl7::graphics::impl::direct3d11::RenderingContextImpl::HardwareStates::AbstractShaderStates

Public Members

TD3D11Shader *shader
template<class TDirect3DShader9>
struct ShaderStates : public xl7::graphics::impl::direct3d9::RenderingContextImpl::HardwareStates::AbstractShaderStates

Public Members

TDirect3DShader9 *shader
struct Signature
#include <Signature.h>

(Unique) signature of any test incident (e.g., registered test case, failed check, warning, exception, etc.).

Subclassed by tl7::Meta

Public Functions

inline Signature(const char *file_path, unsigned line_number, signed iteration_number = -1)
bool operator==(const Signature &rhs) const
auto operator<=>(const Signature &rhs) const = default

Public Members

const char *file_path

The path to the file where the test incident occurred.

unsigned line_number

The line number where the test incident occurred.

signed iteration_number

The iteration number/index (or -1 if not applicable).

struct Signature

Public Members

uint8_t _x89
char png[3]
char crlf[2]
char eof
char lf
struct SingleLineOptions
#include <JsonWriter.h>

Public Members

bool compact = false
template<typename TValue>
class SingleState

Public Functions

inline bool is_set() const
inline TValue get_value(TValue default_value = TValue()) const
inline void set_value(TValue value)
inline void reset_value()

Private Members

bool _is_set = false
TValue _value = TValue()
template<class TSingleton>
class Singleton : public cl7::creational::SingletonBase
#include <Singleton.h>

Subclassed by xl7::Component< MainWindow >, xl7::Component< GraphicsSystem >, xl7::Component< TSingleton >

Public Functions

Singleton(const Singleton&) = delete
Singleton &operator=(const Singleton&) = delete
Singleton(Singleton&&) = delete
Singleton &operator=(Singleton&&) = delete

Public Static Functions

static inline TSingleton &instance()

Returns the actual singleton object instance. If it does not exist yet, it will be created.

static inline void destroy()

Destroys the actual singleton object instance. The instance is recreated the next time it is accessed.

Protected Functions

Singleton() = default
~Singleton() override = default
inline void _reregister()

Private Functions

inline virtual void _invoke_destroy() final

Private Static Functions

static inline TSingleton *factory_func()
static inline TSingleton &_create()
static inline void _destroy()

Private Static Attributes

static TSingleton *_instance = nullptr
class SingletonBase
#include <Singleton.h>

Subclassed by cl7::creational::Singleton< StandardLogger >, cl7::creational::Singleton< StandardRegistry >, cl7::creational::Singleton< MainWindow >, cl7::creational::Singleton< GraphicsSystem >, cl7::creational::Singleton< TSingleton >, cl7::creational::SingletonManager

Public Functions

SingletonBase(const SingletonBase&) = delete
SingletonBase &operator=(const SingletonBase&) = delete
SingletonBase(SingletonBase&&) = delete
SingletonBase &operator=(SingletonBase&&) = delete

Protected Functions

SingletonBase() = default
virtual ~SingletonBase() = default

Protected Static Functions

static void _register(SingletonBase *singleton)
static void _unregister(SingletonBase *singleton, bool keep_stack = false)
static void _reregister(SingletonBase *singleton)
static void _before_destroy(SingletonBase *singleton)

Private Functions

inline virtual void _before_destroy()

This is called just before the singleton object is destroyed. If the singleton object has cleanup functions that are virtual and therefore cannot be called from the destructor, then they should be called here.

virtual void _invoke_destroy() = 0

Private Static Functions

static std::vector<SingletonBase*>::iterator _find(SingletonBase *singleton)

Private Static Attributes

static std::unique_ptr<std::vector<SingletonBase*>> _stack

Friends

friend class SingletonManager
class SingletonManager : public cl7::creational::SingletonBase
#include <Singleton.h>

Public Functions

SingletonManager() = delete

Public Static Functions

static void destroy_all()

Destroys all singleton objects in the reverse order in which they were registered.

struct SourceLocation
#include <SourceLocation.h>

Public Members

size_t offset = 0

The 0-indexed offset position of the token’s lexeme in the source text.

size_t line = 1

The 1-indexed line number in the source text.

size_t column = 1

The 1-indexed column number in the source text.

class StandardLogger : public cl7::creational::Singleton<StandardLogger>
#include <StandardLogger.h>

Public Functions

StandardLogger(const StandardLogger&) = delete
StandardLogger &operator=(const StandardLogger&) = delete
StandardLogger(StandardLogger&&) = delete
StandardLogger &operator=(StandardLogger&&) = delete
inline Logger *operator->()

Public Static Functions

static inline Logger &instance()

Private Functions

StandardLogger()
~StandardLogger() noexcept override = default

Private Members

Logger _logger

Friends

friend class creational::Singleton< StandardLogger >
class StandardRegistry : public cl7::creational::Singleton<StandardRegistry>
#include <StandardRegistry.h>

Public Functions

StandardRegistry(const StandardRegistry&) = delete
StandardRegistry &operator=(const StandardRegistry&) = delete
StandardRegistry(StandardRegistry&&) = delete
StandardRegistry &operator=(StandardRegistry&&) = delete
inline Registry *operator->()

Public Static Functions

static inline Registry &instance()

Private Functions

StandardRegistry() = default
~StandardRegistry() override = default

Private Members

Registry _registry

Friends

friend class creational::Singleton< StandardRegistry >
template<typename TProxy, unsigned N>
class StateArray

Public Functions

inline bool is_set(unsigned index) const
template<typename TValue = TProxy>
inline TValue get_value(unsigned index, TValue default_value = TValue()) const
template<typename TValue = TProxy>
inline void set_value(unsigned index, TValue value)
inline void reset_value(unsigned index)

Private Members

std::array<Entry, N> a
class StateManager : public xl7::resources::ResourceManager
#include <StateManager.h>

Public Functions

StateManager() = delete
StateManager(const StateManager&) = delete
StateManager &operator=(const StateManager&) = delete
StateManager(StateManager&&) = delete
StateManager &operator=(StateManager&&) = delete
inline states::SamplerState *get_default_sampler_state() const

Returns the default sampler state.

inline states::RasterizerState *get_default_rasterizer_state() const

Returns the default rasterizer state.

inline states::DepthStencilState *get_default_depth_stencil_state() const

Returns the default depth/stencil state.

inline states::BlendState *get_default_blend_state() const

Returns the default blend state.

bool create_default_states()

Creates and acquires the default state objects.

bool release_default_states()

Releases the default state objects.

SamplerState::ID ensure_sampler_state(const SamplerState::Desc &desc)

Creates and acquires the specified sampler state if not already done.

RasterizerState::ID ensure_rasterizer_state(const RasterizerState::Desc &desc)

Creates and acquires the specified rasterizer state if not already done.

DepthStencilState::ID ensure_depth_stencil_state(const DepthStencilState::Desc &desc)

Creates and acquires the specified depth/stencil state if not already done.

BlendState::ID ensure_blend_state(const BlendState::Desc &desc)

Creates and acquires the specified blend state if not already done.

Protected Functions

inline StateManager(IStateFactory *factory)
~StateManager() override = default

Private Members

IStateFactory *const _factory

The state factory.

states::SamplerState *_default_sampler_state

The default sampler state.

states::RasterizerState *_default_rasterizer_state

The default rasterizer state.

states::DepthStencilState *_default_depth_stencil_state

The default depth/stencil state.

states::BlendState *_default_blend_state

The default blend state.

struct Stats
#include <Stats.h>

Public Functions

void reset()
void update(const Result &result)
unsigned interim_fail_count() const
Stats operator+(const Stats &rhs) const
Stats &operator+=(const Stats &rhs)

Public Members

Group cases

The test cases executed.

Group subcases

The subcase branches traversed.

Group checks

The checks performed.

Group assertions

The assertions made.

unsigned exception_count = 0

The number of unexpected exceptions encountered.

unsigned warning_count = 0

The number of warnings issued.

unsigned execution_time_msecs = 0

The execution time in milliseconds.

struct StencilOperationDesc

Public Members

ComparisonFunction stencil_test_function = ComparisonFunction::Always

The function used for stencil testing, comparing the (masked) reference value against the (masked) existing stencil value.

StencilOperation stencil_fail_operation = StencilOperation::Keep

The stencil operation to perform when the stencil test fails.

StencilOperation depth_fail_operation = StencilOperation::Keep

The stencil operation to perform when the stencil test passes but the depth test fails.

StencilOperation pass_operation = StencilOperation::Keep

The stencil operation to perform when stencil test and depth test both pass.

class Stopwatch
#include <Stopwatch.h>

Public Functions

Stopwatch(bool start = true)
inline bool is_running() const

Returns the flag that indicates whether the stopwatch is running (true) or stopped/paused (false).

std::chrono::steady_clock::duration calculate_elapsed_time()

Calculates and returns the elapsed time.

float calculate_elapsed_secs()

Calculates and returns the elapsed time, in seconds. Elapsed times less than 1 millisecond or greater than a few hours may result in (significant) rounding errors.

unsigned calculate_elapsed_msecs()

Calculates and returns the elapsed time, in milliseconds. The elapsed time should not exceed 46 days to avoid integer overflow.

unsigned calculate_elapsed_usecs()

Calculates and returns the elapsed time, in microseconds. The elapsed time should not exceed 1 hour to avoid integer overflow.

void reset()

Resets the stopwatch. If the stopwatch was running, it will be restarted immediately; if it was stopped/paused then not.

void start()

(Re-)starts the stopwatch. The start point in time will be reset to the current time.

void stop()

Stops/pauses the stopwatch.

void resume()

Resumes/starts the stopwatch. The start point in time will not be changed.

Private Members

std::chrono::steady_clock::time_point _start

The start point in time.

std::chrono::steady_clock::time_point _end

The end point in time.

std::chrono::steady_clock::duration _pause = {}

The cumulative duration of pauses during the stopwatch’s operation.

bool _is_running = false

The flag that indicates whether the stopwatch is running (true) or stopped/paused (false).

template<typename Tchar = cl7::u8char_type>
struct string_hash
#include <string.h>

Public Types

using is_transparent = void
using Tstring_view = std::basic_string_view<Tchar>
using Tstring = std::basic_string<Tchar>

Public Functions

inline size_t operator()(const Tchar *str) const
inline size_t operator()(Tstring_view str) const
inline size_t operator()(const Tstring &str) const
class SubcaseBranchSwitch

Public Functions

SubcaseBranchSwitch() = delete
SubcaseBranchSwitch(Context &ctx, cl7::u8string_view name, const char *file_path, unsigned line_number, signed iteration_number = -1)
SubcaseBranchSwitch(const SubcaseBranchSwitch&) = delete
SubcaseBranchSwitch &operator=(const SubcaseBranchSwitch&) = delete
SubcaseBranchSwitch(SubcaseBranchSwitch&&) = delete
SubcaseBranchSwitch &operator=(SubcaseBranchSwitch&&) = delete
~SubcaseBranchSwitch()
inline const Meta &meta() const

Returns the meta description of where the subtest has been defined and registered.

inline bool has_been_entered() const

Returns the flag indicating whether the corresponding subcase branch has been entered or not.

inline operator bool() const

Returns the flag indicating whether the corresponding subcase branch has been entered or not.

Private Members

const Meta _meta

The meta description of where the subtest has been defined and registered.

Context &_ctx

The current context within which the subcase is executed.

bool _has_been_entered

The flag indicating whether the corresponding subcase branch has been entered or not.

class SubcaseContext
#include <SubcaseContext.h>

Public Functions

void start_run()
bool try_push(const Meta &meta)
bool try_pop(const Meta &meta)
inline bool has_next() const
inline size_t get_current_depth() const
signed get_current_iteration_number() const
const Meta *get_current_meta() const
const Meta *get_meta_at(size_t depth) const
inline std::shared_ptr<cl7::u8string> get_data_string() const
inline void set_data_string(const std::shared_ptr<cl7::u8string> &data_string)
inline void reset_data_string()

Private Members

std::shared_ptr<cl7::u8string> _data_string
bool _leaf_reached = false
size_t _current_depth = 0
std::vector<Meta> _current_stack
std::vector<Signature> _next_stack
std::unordered_set<Signature, Signature::hash, Signature::equal_to> _completed_nodes
class Surface : public xl7::resources::Resource
#include <Surface.h>

Subclassed by xl7::graphics::surfaces::RenderTarget

Public Types

enum class Type

Values:

enumerator TextureSurface
enumerator ColorRenderTarget
enumerator DepthStencilTarget

Public Functions

XL7_DECLARE_RESOURCE_ID()
Surface() = delete
Surface(const Surface&) = delete
Surface &operator=(const Surface&) = delete
Surface(Surface&&) = delete
Surface &operator=(Surface&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline Type get_type() const

Returns the type of the surface.

inline const Desc &get_desc() const

Returns the descriptor of the surface.

Protected Functions

inline Surface(Type type, const CreateParams<Desc> &params)
~Surface() override = default

Private Functions

virtual bool _check_data_impl(const resources::DataProvider &data_provider) override

Checks whether the given data provider complies with the specific properties of the resource to (re)populate it, taking into account the current state of the resource if necessary.

virtual bool _acquire_impl(const resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

Private Members

const Type _type

The type of the surface.

const Desc _desc

The descriptor of the surface.

class SurfaceManager : public xl7::resources::ResourceManager
#include <SurfaceManager.h>

Public Functions

SurfaceManager() = delete
SurfaceManager(const SurfaceManager&) = delete
SurfaceManager &operator=(const SurfaceManager&) = delete
SurfaceManager(SurfaceManager&&) = delete
SurfaceManager &operator=(SurfaceManager&&) = delete

Protected Functions

inline SurfaceManager(ISurfaceFactory *factory)
~SurfaceManager() override = default

Private Members

ISurfaceFactory *const _factory

The surface factory.

template<typename T, size_t size>
struct SwapBytesImpl
#include <bits.h>

Public Static Functions

static inline T swap_bytes(T value)
template<typename T>
struct SwapBytesImpl<T, 1>
#include <bits.h>

Public Static Functions

static inline T swap_bytes(T value)
class TargaImageHandler : public xl7::graphics::images::ImageHandler

Public Functions

~TargaImageHandler() override = default

Private Functions

virtual bool _load_from(cl7::io::irom &rom, const cl7::u8string &rom_name, Image &image) override

Loads an image from any rom.

Private Static Functions

static bool _load_uncompressed(cl7::io::irom &rom, const cl7::u8string &rom_name, const Header &header, const Image::Desc &desc, cl7::byte_span data)

Loads an uncompressed TGA.

static bool _load_compressed(cl7::io::irom &rom, const cl7::u8string &rom_name, const Header &header, const Image::Desc &desc, cl7::byte_span data)

Loads a compressed TGA.

struct TerminalSymbol
#include <TerminalSymbol.h>

Subclassed by dl7::syntax::LiteralSymbol, dl7::syntax::PatternSymbol

Public Functions

TerminalSymbol(SymbolID id)
virtual ~TerminalSymbol() = default
virtual bool is_literal() const = 0
virtual size_t try_match_prefix(cl7::u8string_view source) const = 0

Public Members

SymbolID id

The terminal symbol ID.

class TerminalSymbolCollection

A “set” of terminal symbols and their lexical compositions for BNF-like grammars. A symbol can be defined multiple times, for example to resolve complex regular expressions or to replace those patterns with literal variants.

Public Types

using const_iterator = cl7::const_ptr_forward_iterator<TerminalSymbol>

Public Functions

inline const_iterator begin() const
inline const_iterator end() const
void add(std::unique_ptr<TerminalSymbol> terminal_symbol)

Adds the specified terminal symbol to the collection.

template<class TTerminalSymbol, class ...Args>
inline void add(SymbolID id, Args&&... args)

Adds the specified terminal symbol to the collection.

void add_literal(SymbolID id, cl7::u8string_view literal)

Adds the specified literal symbol to the collection.

void add_pattern(SymbolID id, std::string_view pattern, std::regex_constants::syntax_option_type syntax_options = std::regex_constants::ECMAScript, std::regex_constants::match_flag_type match_flags = std::regex_constants::match_default)

Adds the specified pattern symbol to the collection.

void add_pattern(SymbolID id, std::string_view pattern, cl7::u8string_view literal_prefix, std::regex_constants::syntax_option_type syntax_options = std::regex_constants::ECMAScript, std::regex_constants::match_flag_type match_flags = std::regex_constants::match_default)

Adds the specified pattern symbol to the collection.

inline size_t get_count() const

Returns the number of contained terminal symbols.

inline const TerminalSymbol &get(size_t index) const

Returns the terminal symbol identified by the given index.

bool is_defined(SymbolID id) const

Checks whether the supposed terminal symbol is defined.

Private Members

std::vector<std::unique_ptr<TerminalSymbol>> _terminal_symbols

The “list” of terminal symbols.

class TestCase
#include <TestCase.h>

Public Types

using FuncType = std::add_pointer_t<void(Context&)>

Public Functions

TestCase() = delete
TestCase(FuncType func, cl7::u8string_view name, const char *file_path, unsigned line_number)
TestCase(const TestCase&) = delete
TestCase &operator=(const TestCase&) = delete
TestCase(TestCase&&) = delete
TestCase &operator=(TestCase&&) = delete
~TestCase() = default
inline const Meta &meta() const

The meta description of where the test case has been defined and registered.

void run(Context &ctx)

Runs the test case.

Private Members

const Meta _meta

The meta description of where the test case has been defined and registered.

const FuncType _func

The function to be called running the test case.

class TestSuite
#include <TestSuite.h>

Public Functions

TestSuite(const TestSuite&) = delete
TestSuite &operator=(const TestSuite&) = delete
TestSuite(TestSuite&&) = delete
TestSuite &operator=(TestSuite&&) = delete
int register_test_case(TestCase::FuncType func, cl7::u8string_view name, const char *file_path, unsigned line_number)

Registers the specified test case.

void run_tests()

Runs the registered test cases.

inline const Settings &get_settings() const

Returns the settings.

inline void set_settings(const Settings &settings)

Sets the settings.

inline const reporting::Reporter &get_reporter() const

Returns the central reporter object for communicating test results etc.

inline const Stats &get_stats() const

Returns the aggregated statistics about tests carried out.

inline void reset_stats()

Resets the aggregated statistics about tests carried out.

Public Static Functions

static inline TestSuite &instance()

Private Functions

TestSuite()

Default constructor.

~TestSuite()

Destructor.

void _run_test_case(TestCase &test_case)

Runs the specified test case (and all of its branches).

bool _run_test_case_branch(TestCase &test_case, Context &ctx)

Runs a specific test (sub)case branch. Cancels test execution in case of any exception and returns false then (true otherwise).

Private Members

Settings _settings

The settings.

std::unique_ptr<std::vector<TestCasePtr>> _registered_test_cases

The registered test cases.

std::unique_ptr<reporting::CoutLogger> _cout_logger

The central listener object for logging test results etc. to the standard output stream.

reporting::Reporter _reporter

The central reporter object for communicating test results etc.

Stats _stats

The aggregated statistics about tests carried out.

class Texture : public xl7::resources::Resource
#include <Texture.h>

Subclassed by xl7::graphics::textures::Cubemap, xl7::graphics::textures::Texture2D, xl7::graphics::textures::Texture2DArray, xl7::graphics::textures::Texture3D

Public Types

enum class Type

Values:

enumerator Texture2D
enumerator Texture3D
enumerator Texture2DArray
enumerator Cubemap

Public Functions

XL7_DECLARE_RESOURCE_ID()
Texture() = delete
Texture(const Texture&) = delete
Texture &operator=(const Texture&) = delete
Texture(Texture&&) = delete
Texture &operator=(Texture&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline Type get_type() const

Returns the type of the texture.

inline const Desc &get_desc() const

Returns the descriptor of the texture.

inline ChannelOrder get_channel_order() const

Returns the actual channel order. This may differ from the preferred channel order, depending on hardware capabilities.

inline unsigned get_stride() const

Returns the size of each pixel, in bytes.

inline unsigned get_line_pitch() const

Returns the size of a line (the offset between the start of one line and the start of the next line), in bytes.

inline unsigned get_slice_pitch() const

Returns the size of a 2D image slice (the offset between the start of one 2D image slice and the start of the next 2D image slice if applicable), in bytes.

inline unsigned get_data_size() const

Returns the total data size of this texture, in bytes.

Protected Functions

Texture(Type type, const CreateParams<Desc> &params, unsigned depth, unsigned image_count)
~Texture() override = default
images::Image _as_image(unsigned image_index) const

Returns the specified “image view” of the texture data.

std::vector<images::Image> _create_mipmaps(unsigned image_index, images::ResamplingMethod resampling_method = images::ResamplingMethod::LinearInterpolation) const

Creates and returns mipmaps of the specified texture “image”.

bool _update(const ImageDataProvider &image_data_provider)

Updates the contents of this texture (unless it is immutable). The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

Private Functions

virtual bool _acquire_impl(const ImageDataProvider &image_data_provider) = 0

Requests/acquires the texture resource. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _update_impl(const ImageDataProvider &image_data_provider, bool discard, bool no_overwrite) = 0

Updates the contents of this texture (unless it is immutable). The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _check_data_impl(const resources::DataProvider &data_provider) override

Checks whether the given data provider complies with the specific properties of the resource to (re)populate it, taking into account the current state of the resource if necessary.

virtual bool _fill_data_impl(const resources::DataProvider &data_provider) override

(Re)populates the local data buffer based on the given data provider.

virtual bool _acquire_impl(const resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

Private Members

const Type _type

The type of the texture.

const Desc _desc

The descriptor of the texture.

const ChannelOrder _channel_order

The actual channel order. This may differ from the preferred channel order, depending on hardware capabilities.

const unsigned _depth

The depth of the texture, in pixels (if 3D texture, otherwise trivially 1).

const unsigned _stride

The size of each pixel, in bytes.

const unsigned _line_pitch

The size of a line (the offset between the start of one line and the start of the next line), in bytes.

const unsigned _slice_pitch

The size of a 2D image slice (the offset between the start of one 2D image slice and the start of the next 2D image slice if applicable), in bytes.

const unsigned _data_size

The total data size of this texture, in bytes.

class Texture2D : public xl7::graphics::textures::Texture
#include <Texture2D.h>

Subclassed by xl7::graphics::impl::direct3d11::textures::Texture2DImpl, xl7::graphics::impl::direct3d9::textures::Texture2DImpl

Public Functions

XL7_DERIVE_RESOURCE_ID(Texture)
Texture2D() = delete
Texture2D(const Texture2D&) = delete
Texture2D &operator=(const Texture2D&) = delete
Texture2D(Texture2D&&) = delete
Texture2D &operator=(Texture2D&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline const Desc &get_desc() const

Returns the descriptor of the 2D texture.

inline images::Image as_image() const

Returns an “image view” of the texture data.

inline std::vector<images::Image> create_mipmaps(images::ResamplingMethod resampling_method = images::ResamplingMethod::LinearInterpolation) const

Creates and returns mipmaps of the texture “image”.

bool update(const ImageDataProvider &image_data_provider)

Updates the contents of this texture (unless it is immutable).

Protected Functions

Texture2D(const CreateParams<Desc> &params)
~Texture2D() override = default

Private Members

const Desc _desc

The descriptor of the 2D texture.

class Texture2DArray : public xl7::graphics::textures::Texture
#include <Texture2DArray.h>

Public Functions

XL7_DERIVE_RESOURCE_ID(Texture)
Texture2DArray() = delete
Texture2DArray(const Texture2DArray&) = delete
Texture2DArray &operator=(const Texture2DArray&) = delete
Texture2DArray(Texture2DArray&&) = delete
Texture2DArray &operator=(Texture2DArray&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline const Desc &get_desc() const

Returns the descriptor of the 2D array texture.

inline images::Image as_image(unsigned slice_index) const

Returns an “image view” of the specified texture slice data.

inline std::vector<images::Image> create_mipmaps(unsigned slice_index, images::ResamplingMethod resampling_method = images::ResamplingMethod::LinearInterpolation) const

Creates and returns mipmaps of the specified texture slice “image”.

Protected Functions

Texture2DArray(const CreateParams<Desc> &params)
~Texture2DArray() override = default

Private Members

const Desc _desc

The descriptor of the 2D array texture.

class Texture2DImpl : public xl7::graphics::textures::Texture2D
#include <Texture2DImpl.h>

Public Functions

Texture2DImpl() = delete
Texture2DImpl(const Texture2DImpl&) = delete
Texture2DImpl &operator=(const Texture2DImpl&) = delete
Texture2DImpl(Texture2DImpl&&) = delete
Texture2DImpl &operator=(Texture2DImpl&&) = delete
inline ID3D11Texture2D *get_raw_d3d_texture() const

Returns the Direct3D 11 texture interface.

inline ID3D11ShaderResourceView *get_raw_d3d_shader_resource_view() const

Returns the Direct3D 11 shader resource view interface.

Protected Functions

Texture2DImpl(const CreateParams<Desc> &params)
~Texture2DImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

virtual bool _acquire_impl(const xl7::graphics::textures::ImageDataProvider &image_data_provider) override

Requests/acquires the texture resource. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _update_impl(const xl7::graphics::textures::ImageDataProvider &image_data_provider, bool discard, bool no_overwrite) override

Updates the contents of this texture (unless it is immutable). The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

Private Members

const DXGI_FORMAT _dxgi_format
wrl::ComPtr<ID3D11Texture2D> _d3d_texture

The Direct3D 11 texture interface.

wrl::ComPtr<ID3D11ShaderResourceView> _d3d_shader_resource_view

The Direct3D 11 shader resource view interface.

class Texture2DImpl : public xl7::graphics::textures::Texture2D
#include <Texture2DImpl.h>

Public Functions

Texture2DImpl() = delete
Texture2DImpl(const Texture2DImpl&) = delete
Texture2DImpl &operator=(const Texture2DImpl&) = delete
Texture2DImpl(Texture2DImpl&&) = delete
Texture2DImpl &operator=(Texture2DImpl&&) = delete
inline IDirect3DTexture9 *get_raw_d3d_texture() const

Returns the Direct3D 9 texture interface.

Protected Functions

Texture2DImpl(const CreateParams<Desc> &params)
~Texture2DImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

virtual bool _acquire_impl(const xl7::graphics::textures::ImageDataProvider &image_data_provider) override

Requests/acquires the texture resource. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _update_impl(const xl7::graphics::textures::ImageDataProvider &image_data_provider, bool discard, bool no_overwrite) override

Updates the contents of this texture (unless it is immutable). The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

Private Members

const D3DFORMAT _d3d_format
wrl::ComPtr<IDirect3DTexture9> _d3d_texture

The Direct3D 9 texture interface.

class Texture3D : public xl7::graphics::textures::Texture
#include <Texture3D.h>

Public Functions

XL7_DERIVE_RESOURCE_ID(Texture)
Texture3D() = delete
Texture3D(const Texture3D&) = delete
Texture3D &operator=(const Texture3D&) = delete
Texture3D(Texture3D&&) = delete
Texture3D &operator=(Texture3D&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline const Desc &get_desc() const

Returns the descriptor of the 3D texture.

inline images::Image as_image() const

Returns an “image view” of the texture data.

inline std::vector<images::Image> create_mipmaps(images::ResamplingMethod resampling_method = images::ResamplingMethod::LinearInterpolation) const

Creates and returns mipmaps of the texture “image”.

Protected Functions

Texture3D(const CreateParams<Desc> &params)
~Texture3D() override = default

Private Members

const Desc _desc

The descriptor of the 3D texture.

class TextureManager : public xl7::resources::ResourceManager
#include <TextureManager.h>

Public Functions

TextureManager() = delete
TextureManager(const TextureManager&) = delete
TextureManager &operator=(const TextureManager&) = delete
TextureManager(TextureManager&&) = delete
TextureManager &operator=(TextureManager&&) = delete
Texture2D::ID create_texture_2d(cl7::u8string_view identifier, const Texture2D::Desc &desc, const ImageDataProvider &data_provider)

Creates and acquires the specified 2D texture.

Protected Functions

inline TextureManager(ITextureFactory *factory)
~TextureManager() override = default

Private Members

ITextureFactory *const _factory

The texture factory.

struct TextureSamplerDeclaration

Public Members

cl7::u8string name

The name of the texture/sampler.

unsigned index

The 0-based texture/sampler slot index.

unsigned element_count

The number of (array) elements.

struct TextureSamplerStates

Subclassed by xl7::graphics::impl::direct3d11::RenderingContextImpl::HardwareStates::AbstractShaderStates

Public Members

ID3D11ShaderResourceView *shader_resource_views[pipeline::AbstractShaderStage::MAX_TEXTURE_SAMPLER_SLOTS]
ID3D11SamplerState *sampler_states[pipeline::AbstractShaderStage::MAX_TEXTURE_SAMPLER_SLOTS]
struct TextureSamplerStates

Subclassed by xl7::graphics::impl::direct3d9::RenderingContextImpl::HardwareStates::AbstractShaderStates

Public Members

IDirect3DBaseTexture9 *base_textures[pipeline::AbstractShaderStage::MAX_TEXTURE_SAMPLER_SLOTS]
states::D3DSamplerStateTypeValues sampler_state_type_values[pipeline::AbstractShaderStage::MAX_TEXTURE_SAMPLER_SLOTS]
struct Token
#include <Token.h>

Public Members

SymbolID symbol_id

The terminal symbol ID of the token.

cl7::u8string_view lexeme

The piece of the source text that matches the terminal symbol definition.

SourceLocation source_location

The location of the token in the source text.

class u8isstream
#include <sstream.h>

Public Functions

u8isstream(u8string_view str)
unsigned int peek()
unsigned int get()
u8isstream &get(u8char_type &ch)
u8isstream &getline(u8char_type *s, std::streamsize count, u8char_type delim = cl7::u8char_type{'\n'})
u8isstream &ignore(std::streamsize count = 1, unsigned int delim = std::char_traits<u8char_type>::eof())
template<typename T>
inline u8isstream &operator>>(T &value)
explicit operator bool() const

Private Members

std::istringstream _iss
class u8osstream
#include <sstream.h>

Public Functions

u8string str() const
u8osstream &put(u8char_type ch)
template<typename T>
inline u8osstream &operator<<(T value)
template<typename T>
inline u8osstream &operator<<(const T &value)
u8osstream &operator<<(u8char_type value)
u8osstream &operator<<(u8string_view value)
u8osstream &operator<<(const u8string &value)
u8osstream &operator<<(const u8char_type *value)
explicit operator bool() const

Private Members

std::ostringstream _oss
class user
#include <user.h>

Public Types

enum class UserNameFormat

Values:

enumerator FullUserName
enumerator PureUserName

Public Static Functions

static cl7::u8string get_user_name(UserNameFormat user_name_format)

Retrieves the name of the system user.

class utf8_reader
#include <utf8_reader.h>

Public Functions

explicit utf8_reader(irom *rom) noexcept

Prepares a UTF-8 reader for reading from the specified read-only memory.

cl7::u8string read() const

Reads and returns all available/remaining data.

cl7::u8string read_line() const

Attempts to read the next line.

Private Members

irom *_rom

The read-only memory to read from.

class utf8_writer
#include <utf8_writer.h>

Public Functions

explicit utf8_writer(ifile *file) noexcept

Prepares a UTF-8 writer for writing to the specified file.

size_t write(cl7::u8string_view text)

Attempts to write the given UTF-8 string and returns the number of UTF-8 characters/bytes actually transferred.

size_t write_line(cl7::u8string_view line)

Attempts to write the given UTF-8 string followed by a line break (\n). The number of UTF-8 characters/bytes actually transferred is then returned, without the appended line break.

Private Members

ifile *_file

The file to write to.

union Value32

Public Members

uint8_t v[4]
struct xl7::graphics::Color::Value32
uint32_t value
struct Vector2
#include <Vector2.h>

Public Functions

inline constexpr Vector2() noexcept

Default constructor. Initializes the vector with x = y = 0.

inline constexpr Vector2(float x, float y) noexcept

Explicit constructor with parameters for x and y.

inline explicit constexpr Vector2(float c) noexcept

Explicit constructor with one parameter for both x and y.

void swap(Vector2 &other) noexcept

Swap operation.

inline float length() const

Returns the magnitude of this vector.

inline float lensqr() const

Returns the squared magnitude of this vector.

float azimuth_symmetric() const

Returns the azimuth angle of this vector in the signed range [-pi;+pi], with the positive x-axis pointing east and the positive y-axis pointing north.

float azimuth_asymmetric() const

Returns the azimuth angle of this vector in the positive range [0;2pi], with the positive x-axis pointing east and the positive y-axis pointing north.

float elevation() const

Returns the elevation angle of this vector in the range [-pi/2;+pi/2], with the positive y-axis pointing up.

inline Vector2 x_() const

Returns a new vector with the x component of this (y = 0).

inline Vector2 _y() const

Returns a new vector with the y component of this (x = 0).

inline Vector2 xx() const

Returns a new vector with all of its components set to the x value of this.

inline Vector2 yy() const

Returns a new vector with all of its components set to the y value of this.

inline Vector2 normalized() const

Returns a copy of this vector normalized.

inline Vector2 abs() const

Returns this vector having positive components.

inline float dot(const Vector2 &v) const

Returns the dot/scalar product of this and a given vector v.

inline float dotsqr(const Vector2 &v) const

Returns the squared dot/scalar product of this and a given vector v.

inline Vector2 perp() const

Returns the perpendicular of this vector. The perpendicular corresponds to the vector rotated 90 degrees to the left (counter-clockwise).

inline float perpdot(const Vector2 &v) const

Returns the perp-dot product of this vector and a given vector v, i.e. the dot/scalar product of both vectors in which this vector is replaced by the perpendicular rotated 90 degrees to the left (counter-clockwise). So, a.perpdot(b) is the same as a.perp().dot(b).

inline Vector2 reflected(const Vector2 &n) const

Returns this vector reflected across a plane defined by a given normal vector n.

Vector2 refracted(const Vector2 &n, float index) const

Returns this vector refracted across a plane defined by a given normal vector n with respect to the specified refractive index.

inline float comp(const Vector2 &v) const

Returns the scalar projection of a given vector v onto this one.

inline Vector2 proj(const Vector2 &v) const

Returns the vector projection of a given vector v onto this one.

inline Vector2 &clear()

Sets x = y = 0.

inline Vector2 &invert()

Inverts the sign of the components of this vector.

inline Vector2 &normalize()

Normalizes this vector that it has a magnitude of 1.

inline Vector2 &length(float length)

Lets this vector have a magnitude of the given length.

inline Vector2 &reflect(const Vector2 &n)

Reflects this vector across a plane defined by a given normal vector n.

inline Vector2 &refract(const Vector2 &n, float index)

Refracts this vector across a plane defined by a given normal vector n with respect to the specified refractive index.

inline bool operator==(const Vector2 &v) const
inline bool operator!=(const Vector2 &v) const
inline bool operator<(const Vector2 &v) const

Checks if this vector is component-by-component less than a given vector v.

inline bool operator>(const Vector2 &v) const

Checks if this vector is component-by-component greater than a given vector v.

inline bool operator<=(const Vector2 &v) const

Checks if this vector is component-by-component less than or equal to a given vector v.

inline bool operator>=(const Vector2 &v) const

Checks if this vector is component-by-component greater than or equal to a given vector v.

inline constexpr Vector2 operator+() const

Returns a copy of this vector unmodified.

inline constexpr Vector2 operator-() const

Returns a copy of this vector with the signs of the elements flipped.

inline constexpr Vector2 operator+(const Vector2 &v) const

Returns the (component-wise) vector sum of two vectors.

inline constexpr Vector2 operator-(const Vector2 &v) const

Returns the (component-wise) vector difference of two vectors.

inline constexpr Vector2 operator*(const Vector2 &v) const

Returns the (component-wise) Hadamard product of two vectors.

inline constexpr Vector2 operator/(const Vector2 &v) const

Returns the (component-wise) Hadamard quotient of two vectors.

inline constexpr Vector2 operator*(float s) const

Returns a copy of this vector scaled by the specified factor (scalar multiplication).

inline constexpr Vector2 operator/(float s) const

Returns a copy of this vector inversely scaled by the specified factor (scalar division).

inline constexpr Vector2 &operator+=(const Vector2 &v)

Adds the given vector to this one, resulting in the (component-wise) vector sum.

inline constexpr Vector2 &operator-=(const Vector2 &v)

Subtracts the given vector from this one, resulting in the (component-wise) vector difference.

inline constexpr Vector2 &operator*=(const Vector2 &v)

Multiplies the given vector with this one, resulting in the (component-wise) Hadamard product.

inline constexpr Vector2 &operator/=(const Vector2 &v)

Divides this vector by the given one, resulting in the (component-wise) Hadamard quotient.

inline constexpr Vector2 &operator*=(float s)

Scales this vector by the specified factor (scalar multiplication).

inline constexpr Vector2 &operator/=(float s)

Inversely scales this vector by the specified factor (scalar division).

inline float operator[](unsigned i) const
inline float &operator[](unsigned i)

Public Members

float x

The vector’s x value (x = u = s).

float y

The vector’s y value (y = v = t).

float u

The texture coordinate u (u = s = x).

float v

The texture coordinate v (v = t = y).

float s

The texture coordinate s (s = u = x).

float t

The texture coordinate t (t = v = y).

float data[2]

Array of the two components.

union ml7::Vector2

Public Static Functions

static Vector2 min2(const Vector2 &a, const Vector2 &b)

Returns a vector having the minimum components of two given vectors.

static Vector2 max2(const Vector2 &a, const Vector2 &b)

Returns a vector having the maximum components of two given vectors.

static Vector2 lerp(const Vector2 &a, const Vector2 &b, float x)

Performs a linear interpolation between a and b, with y = a + (b-a)x.

static Vector2 terp(const Vector2 &a, const Vector2 &b, float x)

Performs a cosine interpolation between a and b, with y = a + (b-a)z and z = (1-cos(wx))/2, w = pi.

static Vector2 cerp(const Vector2 &a0, const Vector2 &a, const Vector2 &b, const Vector2 &b1, float x)

Performs a cubic interpolation between a and b (affected by a0, the point “before” a, and b1, the point “after” b), with y = Px^3 + Qx^2 + Rx + S and P = (b1-b)-(a0-a), Q = (a0-a)-P, R = b-a0, S = a.

static float ccw(const ml7::Vector2 &a, const ml7::Vector2 &b, const ml7::Vector2 &c)

Checks whether the three given points are a counter-clockwise turn. In that case, the function returns a value greater than 0. A value less than 0 indicates a clockwise turn. 0 indicates that the points are collinear.

Public Static Attributes

static const Vector2 ZERO = {0.0f, 0.0f}
static const Vector2 X = {1.0f, 0.0f}
static const Vector2 Y = {0.0f, 1.0f}
struct Vector3
#include <Vector3.h>

Public Functions

inline constexpr Vector3() noexcept

Default constructor. Initializes the vector with x = y = z = 0.

inline constexpr Vector3(float x, float y, float z) noexcept

Explicit constructor with parameters for x, y, and z.

inline explicit constexpr Vector3(float c) noexcept

Explicit constructor with one parameter for x, y, and z.

void swap(Vector3 &other) noexcept

Swap operation.

inline float length() const

Returns the magnitude of this vector.

inline float lensqr() const

Returns the squared magnitude of this vector.

float azimuth_symmetric() const

Returns the azimuth angle of this vector in the signed range [-pi;+pi], with the positive x-axis pointing east and the positive z-axis pointing north.

float azimuth_asymmetric() const

Returns the azimuth angle of this vector in the positive range [0;2pi], with the positive x-axis pointing east and the positive z-axis pointing north.

float elevation() const

Returns the elevation angle of this vector in the range [-pi/2;+pi/2], with the positive y-axis pointing up.

inline Vector3 x__() const

Returns a new vector with the x component of this (y = z = 0).

inline Vector3 _y_() const

Returns a new vector with the y component of this (x = z = 0).

inline Vector3 __z() const

Returns a new vector with the y component of this (x = y = 0).

inline Vector3 xy_() const

Returns a new vector with the x and y components of this (z = 0).

inline Vector3 x_z() const

Returns a new vector with the x and z components of this (y = 0).

inline Vector3 _yz() const

Returns a new vector with the y and z components of this (x = 0).

inline Vector3 xxx() const

Returns a new vector with all of its components set to the x value of this.

inline Vector3 yyy() const

Returns a new vector with all of its components set to the y value of this.

inline Vector3 zzz() const

Returns a new vector with all of its components set to the y value of this.

inline Vector3 normalized() const

Returns a copy of this vector normalized.

inline Vector3 abs() const

Returns this vector having positive components.

inline float dot(const Vector3 &v) const

Returns the dot/scalar product of this and a given vector v.

inline float dotsqr(const Vector3 &v) const

Returns the squared dot/scalar product of this and a given vector v.

inline Vector3 cross(const Vector3 &v) const

Returns the cross product of this and a given vector v.

inline Vector3 reflected(const Vector3 &n) const

Returns this vector reflected across a plane defined by a given normal vector n.

Vector3 refracted(const Vector3 &n, float index) const

Returns this vector refracted across a plane defined by a given normal vector n with respect to the specified refractive index.

inline float comp(const Vector3 &v) const

Returns the scalar projection of a given vector v onto this one.

inline Vector3 proj(const Vector3 &v) const

Returns the vector projection of a given vector v onto this one.

inline Vector3 &clear()

Sets x = y = z = 0.

inline Vector3 &invert()

Inverts the sign of the components of this vector.

inline Vector3 &normalize()

Normalizes this vector that it has a magnitude of 1.

inline Vector3 &length(float length)

Lets this vector have a magnitude of the given length.

inline Vector3 &reflect(const Vector3 &n)

Reflects this vector across a plane defined by a given normal vector n.

inline Vector3 &refract(const Vector3 &n, float index)

Refracts this vector across a plane defined by a given normal vector n with respect to the specified refractive index.

inline bool operator==(const Vector3 &v) const
inline bool operator!=(const Vector3 &v) const
inline bool operator<(const Vector3 &v) const

Checks if this vector is component-by-component less than a given vector v.

inline bool operator>(const Vector3 &v) const

Checks if this vector is component-by-component greater than a given vector v.

inline bool operator<=(const Vector3 &v) const

Checks if this vector is component-by-component less than or equal to a given vector v.

inline bool operator>=(const Vector3 &v) const

Checks if this vector is component-by-component greater than or equal to a given vector v.

inline constexpr Vector3 operator+() const

Returns a copy of this vector unmodified.

inline constexpr Vector3 operator-() const

Returns a copy of this vector with the signs of the elements flipped.

inline constexpr Vector3 operator+(const Vector3 &v) const

Returns the (component-wise) vector sum of two vectors.

inline constexpr Vector3 operator-(const Vector3 &v) const

Returns the (component-wise) vector difference of two vectors.

inline constexpr Vector3 operator*(const Vector3 &v) const

Returns the (component-wise) Hadamard product of two vectors.

inline constexpr Vector3 operator/(const Vector3 &v) const

Returns the (component-wise) Hadamard quotient of two vectors.

inline constexpr Vector3 operator*(float s) const

Returns a copy of this vector scaled by the specified factor (scalar multiplication).

inline constexpr Vector3 operator/(float s) const

Returns a copy of this vector inversely scaled by the specified factor (scalar division).

inline constexpr Vector3 &operator+=(const Vector3 &v)

Adds the given vector to this one, resulting in the (component-wise) vector sum.

inline constexpr Vector3 &operator-=(const Vector3 &v)

Subtracts the given vector from this one, resulting in the (component-wise) vector difference.

inline constexpr Vector3 &operator*=(const Vector3 &v)

Multiplies the given vector with this one, resulting in the (component-wise) Hadamard product.

inline constexpr Vector3 &operator/=(const Vector3 &v)

Divides this vector by the given one, resulting in the (component-wise) Hadamard quotient.

inline constexpr Vector3 &operator*=(float s)

Scales this vector by the specified factor (scalar multiplication).

inline constexpr Vector3 &operator/=(float s)

Inversely scales this vector by the specified factor (scalar division).

inline float operator[](unsigned i) const
inline float &operator[](unsigned i)

Public Members

float x

The vector’s x value.

float y

The vector’s y value.

float z

The vector’s z value.

float data[3]

Array of all three components.

union ml7::Vector3

Public Static Functions

static Vector3 min2(const Vector3 &a, const Vector3 &b)

Returns a vector having the minimum components of two given vectors.

static Vector3 max2(const Vector3 &a, const Vector3 &b)

Returns a vector having the maximum components of two given vectors.

static Vector3 lerp(const Vector3 &a, const Vector3 &b, float x)

Performs a linear interpolation between a and b, with y = a + (b-a)x.

static Vector3 terp(const Vector3 &a, const Vector3 &b, float x)

Performs a cosine interpolation between a and b, with y = a + (b-a)z and z = (1-cos(wx))/2, w = pi.

static Vector3 cerp(const Vector3 &a0, const Vector3 &a, const Vector3 &b, const Vector3 &b1, float x)

Performs a cubic interpolation between a and b (affected by a0, the point “before” a, and b1, the point “after” b), with y = Px^3 + Qx^2 + Rx + S and P = (b1-b)-(a0-a), Q = (a0-a)-P, R = b-a0, S = a.

Public Static Attributes

static const Vector3 ZERO = {0.0f, 0.0f, 0.0f}
static const Vector3 X = {1.0f, 0.0f, 0.0f}
static const Vector3 Y = {0.0f, 1.0f, 0.0f}
static const Vector3 Z = {0.0f, 0.0f, 1.0f}
struct Vector4
#include <Vector4.h>

Public Functions

inline constexpr Vector4() noexcept

Default constructor. Initializes the vector with x = y = z = w = 0.

inline constexpr Vector4(float x, float y, float z) noexcept

Explicit constructor with parameters for x, y, and z. Sets w = 1.

inline constexpr Vector4(float x, float y, float z, float w) noexcept

Explicit constructor with parameters for x, y, z, and w.

inline explicit constexpr Vector4(float c) noexcept

Explicit constructor with one parameter for x, y, z, and w.

inline constexpr Vector4(float c, float w) noexcept

Explicit constructor with one parameter for x, y, and z and one for w.

inline explicit constexpr Vector4(const ml7::Vector3 &v) noexcept

Explicit constructor with one parameter for a 3D vector. Sets w = 1.

inline explicit constexpr Vector4(const ml7::Vector3 &v, float w) noexcept

Explicit constructor with one parameter for a 3D vector and one for w.

void swap(Vector4 &other) noexcept

Swap operation.

inline float length() const

Returns the magnitude of this vector.

inline float lensqr() const

Returns the squared magnitude of this vector.

inline Vector4 dehomogenized() const

Interprets this 4D vector as a homogeneous 3D vector and returns a dehomogenized copy of it with w = 1 (if w != 0).

inline Vector4 normalized() const

Returns a copy of this vector normalized.

inline Vector4 abs() const

Returns this vector having positive components.

inline Vector3 to_vector3() const

Interprets this 4D vector as a homogeneous 3D vector and returns a dehomogenized 3D “copy” of it.

inline Vector4 &clear()

Sets x = y = z = w = 0.

inline Vector4 &invert()

Inverts the sign of the components of this vector.

inline Vector4 &dehomogenize()

Interprets this 4D vector as a homogeneous 3D vector and dehomogenizes it so that w = 1 (if w != 0).

inline Vector4 &normalize()

Normalizes this vector that it has a magnitude of 1.

inline Vector4 &length(float length)

Lets this vector have a magnitude of the given length.

inline bool operator==(const Vector4 &v) const
inline bool operator!=(const Vector4 &v) const
inline bool operator<(const Vector4 &v) const

Checks if this vector is component-by-component less than a given vector v.

inline bool operator>(const Vector4 &v) const

Checks if this vector is component-by-component greater than a given vector v.

inline bool operator<=(const Vector4 &v) const

Checks if this vector is component-by-component less than or equal to a given vector v.

inline bool operator>=(const Vector4 &v) const

Checks if this vector is component-by-component greater than or equal to a given vector v.

inline constexpr Vector4 operator+() const

Returns a copy of this vector unmodified.

inline constexpr Vector4 operator-() const

Returns a copy of this vector with the signs of the elements flipped.

inline constexpr Vector4 operator+(const Vector4 &v) const

Returns the (component-wise) vector sum of two vectors.

inline constexpr Vector4 operator-(const Vector4 &v) const

Returns the (component-wise) vector difference of two vectors.

inline constexpr Vector4 operator*(const Vector4 &v) const

Returns the (component-wise) Hadamard product of two vectors.

inline constexpr Vector4 operator/(const Vector4 &v) const

Returns the (component-wise) Hadamard quotient of two vectors.

inline constexpr Vector4 operator*(float s) const

Returns a copy of this vector scaled by the specified factor (scalar multiplication).

inline constexpr Vector4 operator/(float s) const

Returns a copy of this vector inversely scaled by the specified factor (scalar division).

inline constexpr Vector4 &operator+=(const Vector4 &v)

Adds the given vector to this one, resulting in the (component-wise) vector sum.

inline constexpr Vector4 &operator-=(const Vector4 &v)

Subtracts the given vector from this one, resulting in the (component-wise) vector difference.

inline constexpr Vector4 &operator*=(const Vector4 &v)

Multiplies the given vector with this one, resulting in the (component-wise) Hadamard product.

inline constexpr Vector4 &operator/=(const Vector4 &v)

Divides this vector by the given one, resulting in the (component-wise) Hadamard quotient.

inline constexpr Vector4 &operator*=(float s)

Scales this vector by the specified factor (scalar multiplication).

inline constexpr Vector4 &operator/=(float s)

Inversely scales this vector by the specified factor (scalar division).

inline float operator[](unsigned i) const
inline float &operator[](unsigned i)

Public Members

float x

The vector’s x value.

float y

The vector’s y value.

float z

The vector’s z value.

float w

The vector’s w value.

float data[4]

Array of all four components.

union ml7::Vector4

Public Static Functions

static Vector4 min2(const Vector4 &a, const Vector4 &b)

Returns a vector having the minimum components of two given vectors.

static Vector4 max2(const Vector4 &a, const Vector4 &b)

Returns a vector having the maximum components of two given vectors.

static Vector4 lerp(const Vector4 &a, const Vector4 &b, float x)

Performs a linear interpolation between a and b, with y = a + (b-a)x.

static Vector4 terp(const Vector4 &a, const Vector4 &b, float x)

Performs a cosine interpolation between a and b, with y = a + (b-a)z and z = (1-cos(wx))/2, w = pi.

static Vector4 cerp(const Vector4 &a0, const Vector4 &a, const Vector4 &b, const Vector4 &b1, float x)

Performs a cubic interpolation between a and b (affected by a0, the point “before” a, and b1, the point “after” b), with y = Px^3 + Qx^2 + Rx + S and P = (b1-b)-(a0-a), Q = (a0-a)-P, R = b-a0, S = a.

Public Static Attributes

static const Vector4 ZERO = {0.0f, 0.0f, 0.0f}
static const Vector4 X = {1.0f, 0.0f, 0.0f}
static const Vector4 Y = {0.0f, 1.0f, 0.0f}
static const Vector4 Z = {0.0f, 0.0f, 1.0f}
struct Version
#include <Version.h>

Public Types

enum class PreReleaseType : signed

Values:

enumerator Alpha
enumerator Beta
enumerator ReleaseCandidate
enumerator Release
enumerator None

Public Functions

cl7::u8string to_string(bool short_format = false) const

“Stringifies” this version object.

auto operator<=>(const Version &rhs) const noexcept = default

Compares two version objects. The build metadata doesn’t actually need to be part of the comparison. But I ask myself: why not? So let’s just fall back to the default implementation of the “spaceship” operator.

Public Members

unsigned major = 0
unsigned minor = 0
unsigned patch = 0
enum cl7::Version::PreReleaseType pre_release_type = PreReleaseType::None
unsigned pre_release_number = 0
cl7::u8string build

Public Static Functions

static Version parse(const cl7::u8string &string)

Parses the given version string.

class VertexBuffer : public xl7::graphics::meshes::MeshBuffer
#include <VertexBuffer.h>

Subclassed by xl7::graphics::impl::direct3d11::meshes::VertexBufferImpl, xl7::graphics::impl::direct3d9::meshes::VertexBufferImpl

Public Functions

XL7_DERIVE_RESOURCE_ID(MeshBuffer)
VertexBuffer() = delete
VertexBuffer(const VertexBuffer&) = delete
VertexBuffer &operator=(const VertexBuffer&) = delete
VertexBuffer(VertexBuffer&&) = delete
VertexBuffer &operator=(VertexBuffer&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

inline const Desc &get_desc() const

Returns the descriptor of the vertex buffer.

Protected Functions

VertexBuffer(const CreateParams<Desc> &params)
~VertexBuffer() override = default

Private Members

const Desc _desc

The descriptor of the vertex buffer.

struct VertexBufferBinding

Public Functions

VertexBufferBinding() = default
bool operator==(const VertexBufferBinding &rhs) const noexcept
size_t hash() const noexcept

Public Members

resources::ResourceID vertex_buffer_ids[pipeline::InputAssemblerStage::MAX_VERTEX_STREAMS] = {}
unsigned stream_count = 0
class VertexBufferImpl : public xl7::graphics::meshes::VertexBuffer
#include <VertexBufferImpl.h>

Public Functions

VertexBufferImpl() = delete
VertexBufferImpl(const VertexBufferImpl&) = delete
VertexBufferImpl &operator=(const VertexBufferImpl&) = delete
VertexBufferImpl(VertexBufferImpl&&) = delete
VertexBufferImpl &operator=(VertexBufferImpl&&) = delete
inline ID3D11Buffer *get_raw_d3d_vertex_buffer() const

Returns the Direct3D 11 vertex buffer interface.

Protected Functions

VertexBufferImpl(const CreateParams<Desc> &params)
~VertexBufferImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _acquire_impl(const resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

virtual bool _update_impl(const resources::DataProvider &data_provider, bool discard, bool no_overwrite) override

Updates the contents of this vertex buffer (unless it is immutable). The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

Private Members

wrl::ComPtr<ID3D11Buffer> _d3d_vertex_buffer

The Direct3D 11 vertex buffer interface.

class VertexBufferImpl : public xl7::graphics::meshes::VertexBuffer
#include <VertexBufferImpl.h>

Public Functions

VertexBufferImpl() = delete
VertexBufferImpl(const VertexBufferImpl&) = delete
VertexBufferImpl &operator=(const VertexBufferImpl&) = delete
VertexBufferImpl(VertexBufferImpl&&) = delete
VertexBufferImpl &operator=(VertexBufferImpl&&) = delete
inline IDirect3DVertexBuffer9 *get_raw_d3d_vertex_buffer() const

Returns the Direct3D 9 vertex buffer interface.

Protected Functions

VertexBufferImpl(const CreateParams<Desc> &params)
~VertexBufferImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _acquire_impl(const resources::DataProvider &data_provider) override

Requests/acquires the resource, bringing it into a usable state. The given data provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included in the event that it contains additional implementation-specific information.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

virtual bool _update_impl(const resources::DataProvider &data_provider, bool discard, bool no_overwrite) override

Updates the contents of this vertex buffer (unless it is immutable). The given data provider can possibly be ignored because the local data buffer has already been updated based on it. It is still included in the event that it contains additional implementation-specific information.

Private Members

const DWORD _d3d_fvf
wrl::ComPtr<IDirect3DVertexBuffer9> _d3d_vertex_buffer

The Direct3D 9 vertex buffer interface.

template<class TVertex>
class VertexDataProvider : public xl7::resources::DefaultDataProvider

Public Functions

inline VertexDataProvider(std::span<const TVertex> data, size_t offset = 0)
~VertexDataProvider() override = default
struct VertexLayout
#include <VertexLayout.h>

Public Types

enum class Semantic

Values:

enumerator POSITION

Vertex position in object space.

enumerator POSITIONT

Transformed vertex position.

enumerator NORMAL

Normal vector.

enumerator TANGENT

Tangent vector.

enumerator BINORMAL

Binormal vector.

enumerator COLOR

Diffuse/specular color etc.

enumerator TEXCOORD

Texture coordinates.

enumerator BLENDINDICES

Blending indices.

enumerator BLENDWEIGHT

Blending weight.

enumerator PSIZE

Point size.

enum class DataType

Values:

enumerator FLOAT1

One-component float expanded to (value, 0, 0, 1).

enumerator FLOAT2

Two-component float expanded to (value, value, 0, 1).

enumerator FLOAT3

Three-component float expanded to (value, value, value, 1).

enumerator FLOAT4

Four-component float expanded to (value, value, value, value).

enumerator COLOR

Four-component unsigned byte mapped to 0 to 1 range.

enumerator UBYTE4

Four-component unsigned byte.

Public Functions

unsigned calculate_size() const

Calculates the total size of the vertex layout, in bytes.

Public Members

std::vector<Element> elements

The “ordered list” of vertex elements.

class VertexShader : public xl7::graphics::shaders::Shader
#include <VertexShader.h>

Subclassed by xl7::graphics::impl::direct3d11::shaders::VertexShaderImpl, xl7::graphics::impl::direct3d9::shaders::VertexShaderImpl

Public Functions

XL7_DERIVE_RESOURCE_ID(Shader)
VertexShader() = delete
VertexShader(const VertexShader&) = delete
VertexShader &operator=(const VertexShader&) = delete
VertexShader(VertexShader&&) = delete
VertexShader &operator=(VertexShader&&) = delete
inline virtual cl7::u8string_view get_type_string() const override

Returns the specific type of the resource, as a “human-friendly” string.

Protected Functions

VertexShader(const CreateParams<Desc> &params)
~VertexShader() override = default
class VertexShaderImpl : public xl7::graphics::shaders::VertexShader
#include <VertexShaderImpl.h>

Public Functions

VertexShaderImpl() = delete
VertexShaderImpl(const VertexShaderImpl&) = delete
VertexShaderImpl &operator=(const VertexShaderImpl&) = delete
VertexShaderImpl(VertexShaderImpl&&) = delete
VertexShaderImpl &operator=(VertexShaderImpl&&) = delete
inline ID3D11VertexShader *get_raw_d3d_vertex_shader() const

Returns the Direct3D 11 vertex shader interface.

Protected Functions

VertexShaderImpl(const CreateParams<Desc> &params)
~VertexShaderImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

virtual bool _acquire_precompiled_impl(const xl7::graphics::shaders::CodeDataProvider &code_data_provider) override

Requests/acquires a precompiled shader resource. The actual code of the given code provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included as it contains additional implementation-specific information.

virtual bool _acquire_recompilable_impl(const xl7::graphics::shaders::CodeDataProvider &code_data_provider, xl7::graphics::shaders::ShaderCode &bytecode_out) override

Requests/acquires a recompilable shader resource. The actual code of the given code provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included as it contains additional implementation-specific information.

virtual bool _recompile_impl(const xl7::graphics::shaders::CompileOptions &compile_options, xl7::graphics::shaders::ShaderCode &bytecode_out) override

Recompiles the shader code. This tends to result in the resource having to be completely recreated in the background.

virtual bool _reflect_impl(const xl7::graphics::shaders::ShaderCode &bytecode, xl7::graphics::shaders::ReflectionResult &reflection_result_out) override

Performs a “reflection” on the (compiled) shader bytecode to determine parameter declarations etc.

Private Members

wrl::ComPtr<ID3D11VertexShader> _d3d_vertex_shader

The Direct3D 11 vertex shader interface.

class VertexShaderImpl : public xl7::graphics::shaders::VertexShader
#include <VertexShaderImpl.h>

Public Functions

VertexShaderImpl() = delete
VertexShaderImpl(const VertexShaderImpl&) = delete
VertexShaderImpl &operator=(const VertexShaderImpl&) = delete
VertexShaderImpl(VertexShaderImpl&&) = delete
VertexShaderImpl &operator=(VertexShaderImpl&&) = delete
inline IDirect3DVertexShader9 *get_raw_d3d_vertex_shader() const

Returns the Direct3D 9 vertex shader interface.

Protected Functions

VertexShaderImpl(const CreateParams<Desc> &params)
~VertexShaderImpl() override = default

Private Functions

inline virtual void *_get_raw_resource_impl() const override

Returns the “raw” resource interface/accessor, if applicable, otherwise NULL.

virtual bool _dispose_impl() override

Disposes/”unacquires” the resource. The resource may be in an incompletely acquired state when this function is called. Any cleanup work that is necessary should still be carried out.

virtual bool _acquire_precompiled_impl(const xl7::graphics::shaders::CodeDataProvider &code_data_provider) override

Requests/acquires a precompiled shader resource. The actual code of the given code provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included as it contains additional implementation-specific information.

virtual bool _acquire_recompilable_impl(const xl7::graphics::shaders::CodeDataProvider &code_data_provider, xl7::graphics::shaders::ShaderCode &bytecode_out) override

Requests/acquires a recompilable shader resource. The actual code of the given code provider can possibly be ignored because the local data buffer has already been filled based on it. It is still included as it contains additional implementation-specific information.

virtual bool _recompile_impl(const xl7::graphics::shaders::CompileOptions &compile_options, xl7::graphics::shaders::ShaderCode &bytecode_out) override

Recompiles the shader code. This tends to result in the resource having to be completely recreated in the background.

virtual bool _reflect_impl(const xl7::graphics::shaders::ShaderCode &bytecode, xl7::graphics::shaders::ReflectionResult &reflection_result_out) override

Performs a “reflection” on the (compiled) shader bytecode to determine parameter declarations etc.

Private Members

wrl::ComPtr<IDirect3DVertexShader9> _d3d_vertex_shader

The Direct3D 9 vertex shader interface.

class VertexShaderStage : public xl7::graphics::pipeline::AbstractShaderStage

Private Functions

XL7_GRAPHICS_PIPELINE_SPECIFIC_STATE_PROXY(vertex_shader_id, shaders::VertexShader::ID, shader_id, xl7::resources::id_cast<shaders::VertexShader::ID>)
struct Video
#include <Config.h>

The presets for the graphics component.

Public Members

bool fullscreen

The flag indicating fullscreen or windowed mode.

unsigned width

The screen width, in pixels (0: use default/desktop width).

unsigned height

The screen height, in pixels (0: use default/desktop height).

unsigned refresh_rate

The refresh rate, in Hz (0: adapter default).

struct xl7::Config::Video display_mode
struct Viewport
#include <Viewport.h>

Defines the window dimensions of a render target onto which a 3D volume projects.

Public Members

unsigned x = 0

The x pixel coordinate of the left hand side of the viewport. Default value: 0.

unsigned y = 0

The y pixel coordinate of the top of the viewport. Default value: 0.

unsigned width = 0

The width of the viewport, in pixels. Default value: width of the render target.

unsigned height = 0

The height of the viewport, in pixels. Default value: height of the render target.

float min_z = 0.0f

The minimum depth of the viewport. Default value: 0.

float max_z = 1.0f

The maximum depth of the viewport. Default value: 1.

class Vocabulary
#include <Vocabulary.h>

Public Functions

void add_symbol(SymbolID symbol_id, cl7::u8string_view symbol_name)

Adds the name of a symbol to the vocabulary.

cl7::u8string_view get_symbol_name(SymbolID symbol_id) const

Searches for the name of the specified symbol and returns it (or an empty string if not found).

Private Members

std::unordered_map<SymbolID, cl7::u8string> _names_by_id
template<class Tstring_or_view>
concept is_any_string_or_view_v
#include <string.h>
template<class Tstring>
concept is_any_string_v
#include <string.h>
template<class Tstring_view>
concept is_any_string_view_v
#include <string.h>
namespace cl7

Typedefs

using byte_span = std::span<std::byte>
using byte_vector = std::vector<std::byte>
using byte_view = std::span<const std::byte>
using aisstream = std::istringstream
using wisstream = std::wistringstream
using aosstream = std::ostringstream
using wosstream = std::wostringstream
using u16isstream = std::basic_istringstream<char16_t>
using u32isstream = std::basic_istringstream<char32_t>
using u16osstream = std::basic_ostringstream<char16_t>
using u32osstream = std::basic_ostringstream<char32_t>
using achar_type = char
using u8char_type = char8_t
using u16char_type = char16_t
using u32char_type = char32_t
using wchar_type = wchar_t
using astring = std::string
using u8string = std::u8string
using u16string = std::u16string
using u32string = std::u32string
using wstring = std::wstring
using astring_view = std::string_view
using u8string_view = std::u8string_view
using u16string_view = std::u16string_view
using u32string_view = std::u32string_view
using wstring_view = std::wstring_view
using astring_hash = string_hash<cl7::achar_type>
using u8string_hash = string_hash<cl7::u8char_type>
using u16string_hash = string_hash<cl7::u16char_type>
using u32string_hash = string_hash<cl7::u32char_type>
using wstring_hash = string_hash<cl7::wchar_type>

Functions

template<class Callable>
auto finally(Callable &&callable) noexcept
template<typename ...T>
byte_vector make_bytes(T&&... args) noexcept
template<typename T>
static u8string _to_string(T val)
u8string to_string(bool val)
u8string to_string(signed val)
u8string to_string(signed long val)
u8string to_string(signed long long val)
u8string to_string(unsigned val)
u8string to_string(unsigned long val)
u8string to_string(unsigned long long val)
u8string to_string(float val)
u8string to_string(double val)
u8string to_string(long double val)
template<class Tstring>
auto make_string_view(const Tstring &s)
template<typename T>
const T &coalesce(const T &a, const T &b)

Returns the first parameter that, when interpreted as a Boolean, evaluates to a “true-ish” value. Otherwise, the last value is returned.

cl7::u8string to_string(xl7::graphics::ChannelOrder channel_order)
cl7::u8string to_string(xl7::graphics::PixelFormat pixel_format)
namespace bits

Functions

int16_t float_to_half(float value)

Converts a native 32-bit floating point number to a non-native 16-bit floating point number.

float half_to_float(int16_t value)

Converts a non-native 16-bit floating point number to a native 32-bit floating point number.

unsigned norm_to_fixed(float value, unsigned bit_depth)

Converts a normalized floating point number in the range [0;1] to an unsigned integer value of a certain bit depth (up to 32 bits), so that 1 is mapped to the highest possible integer value of this bit depth.

float fixed_to_norm(unsigned value, unsigned bit_depth)

Converts an unsigned integer value of a certain bit depth (up to 32 bits) to a normalized floating point number in the range [0;1], so that the highest possible integer value of this bit depth is mapped to 1.

unsigned fixed_to_fixed(unsigned value, unsigned src_bit_depth, unsigned dst_bit_depth)

Converts between two unsigned integer values of certain bit depths (up to 32 bits each). The value ranges are mapped in such a way that the highest values correspond to each other.

inline void hash_combine(size_t &hash, size_t value)

Combines two hash values.

template<typename T>
T swap_bytes(T value)

Reverses the bytes in the given (integer) value.

template<std::endian endian, typename T>
T swap_bytes_if_endian(T value)

Reverses the bytes in the given (integer) value if the specified endian matches the endianness of the platform; the value remains unchanged otherwise. The platform is assumed to use either little- or big-endian. We explicitly do not want to address other exotic byte orders.

template<std::endian endian, typename T>
T swap_bytes_unless_endian(T value)

Reverses the bytes in the given (integer) value if the specified endian does not match the endianness of the platform; the value remains unchanged otherwise. The platform is assumed to use either little- or big-endian. We explicitly do not want to address other exotic byte orders.

namespace detail
namespace creational
namespace errors

Functions

cl7::u8string with_context(cl7::u8string_view message, cl7::u8string_view context)
cl7::u8string system_result(unsigned long error_code)
cl7::u8string system_result(unsigned long error_code, cl7::u8string_view context)
namespace filesystem

Functions

cl7::u8string get_working_directory()

Returns the working directory of the module instance.

cl7::u8string get_initial_directory()

Returns the initial directory (where the execution started).

cl7::u8string get_current_directory()

Returns the current directory.

cl7::u8string get_user_directory()

Returns the user directory.

namespace io

Enums

enum class open_mode

Values:

enumerator read
enumerator write
enumerator append
enumerator truncate
enum class seek_mode

Values:

enumerator begin
enumerator current
enumerator end

Functions

inline open_mode operator|(open_mode a, open_mode b)
inline open_mode operator&(open_mode a, open_mode b)
namespace logging

Enums

enum class LogType

Values:

enumerator Log
enumerator Info
enumerator Success
enumerator Warning
enumerator Error
enumerator Caption
enumerator Section
enumerator Item
enumerator ItemPass
enumerator ItemFail
enumerator Code
enumerator Meta
enumerator Comment
enumerator Other

Functions

void std_log(const LogEntry &log_entry)

Logs the specified entry to the standard logger.

void std_log(cl7::u8string_view message, LogType type, const char *file_path, unsigned line_number, const char *function_name)

Logs the specified entry to the standard logger.

namespace memory

Functions

cl7::u8string stringify_byte_amount_si(unsigned long long bytes, cl7::u8string_view zero_string)
cl7::u8string stringify_byte_amount_binary(unsigned long long bytes, cl7::u8string_view zero_string)
unsigned get_reasonable_byte_amount(unsigned long long bytes, unsigned base_factor, unsigned max_orders_of_magnitude, unsigned *orders_of_magnitude_out)
namespace profiling
namespace strings

Enums

enum class Encoding

Values:

enumerator Unknown
enumerator ASCII
enumerator UTF8
enumerator UTF16
enumerator UTF32
enumerator UTFx
enumerator Default

Functions

void _try_log_warning(bool log_warning, cl7::u8string_view message)
bool _try_log_warning_always_return_false(bool log_warning, cl7::u8string_view message)
achar_type _check_adjust_ascii(u32char_type u32c, bool log_warning = false)
u32char_type _check_adjust_unicode(u32char_type u32c, bool log_warning = false)
template<class uxstring, typename uxchar_type>
uxstring _to_utfx(astring_view as)
astring to_ascii(astring_view as)
astring to_ascii(u8string_view u8s)
astring to_ascii(u16string_view u16s)
astring to_ascii(u32string_view u32s)
astring to_ascii(wstring_view ws)
u8string to_utf8(astring_view as)
u8string to_utf8(u8string_view u8s)
u8string to_utf8(u16string_view u16s)
u8string to_utf8(u32string_view u32s)
u8string to_utf8(wstring_view ws)
u16string to_utf16(astring_view as)
u16string to_utf16(u8string_view u8s)
u16string to_utf16(u16string_view u16s)
u16string to_utf16(u32string_view u32s)
u16string to_utf16(wstring_view ws)
u32string to_utf32(astring_view as)
u32string to_utf32(u8string_view u8s)
u32string to_utf32(u16string_view u16s)
u32string to_utf32(u32string_view u32s)
u32string to_utf32(wstring_view ws)
wstring to_utfx(astring_view as)
wstring to_utfx(u8string_view u8s)
wstring to_utfx(u16string_view u16s)
wstring to_utfx(u32string_view u32s)
wstring to_utfx(wstring_view ws)
astring to_ascii_unchecked(byte_view bys)
u8string to_utf8_unchecked(byte_view bys)
u16string to_utf16_unchecked(byte_view bys)
u32string to_utf32_unchecked(byte_view bys)
wstring to_utfx_unchecked(byte_view bys)
byte_vector to_bytes(astring_view as)
byte_vector to_bytes(u8string_view u8s, bool add_bom)
byte_vector to_bytes(u16string_view u16s, bool add_bom, std::endian endian)
byte_vector to_bytes(u32string_view u32s, bool add_bom, std::endian endian)
byte_vector to_bytes(wstring_view ws, bool add_bom, std::endian endian)
bool check_ascii(astring_view as, bool log_warning)
bool check_utf8(u8string_view u8s, bool log_warning)
bool check_utf16(u16string_view u16s, bool log_warning)
bool check_utf32(u32string_view u32s, bool log_warning)
bool parse_utf8(u8string_view u8s, u32string &u32s, bool log_warning)
bool parse_utf16(u16string_view u16s, u32string &u32s, bool log_warning)
size_t utf8_length(u8string_view u8s)

Calculates the length of the specified UTF-8 string in terms of Unicode code points.

size_t utf16_length(u16string_view u16s)

Calculates the length of the specified UTF-16 string in terms of Unicode code points.

std::string_view reinterpret_utf8(u8string_view u8s)

Reinterprets the character format of the specified UTF-8 string. Attention: It is not checked whether a correct UTF-8 encoding is given.

u8string_view reinterpret_utf8(std::string_view s)

Reinterprets the character format of the specified UTF-8 string. Attention: It is not checked whether a correct UTF-8 encoding is given.

Encoding detect_encoding(byte_view bys)
size_t is_whitespace_strict(u8char_type c0, u8char_type c1, u8char_type c2)

Checks whether the specified Unicode code point is whitespace and, if yes, returns the number of corresponding UTF-8 characters (code units). This function enforces strict matching rules:

  • For single-byte whitespace, c1 and c2 must be 0.

  • For two-byte whitespace, c2 must be 0.

size_t is_whitespace_relaxed(u8char_type c0, u8char_type c1, u8char_type c2)

Checks whether the specified Unicode code point is whitespace and, if yes, returns the number of corresponding UTF-8 characters (code units). Unlike the strict version, this function does not require c1 or c2 to be 0 for shorter combinations.

size_t is_whitespace_prefix(u8string_view s)

Checks whether the specified UTF-8 string starts with whitespace and, if yes, returns the number of UTF-8 characters (code units) of the corresponding code point.

size_t is_whitespace_suffix(u8string_view s)

Checks whether the specified UTF-8 string ends with whitespace and, if yes, returns the number of UTF-8 characters (code units) of the corresponding code point.

u8string to_hex(unsigned long long val, u8char_type ca, unsigned pad_zeros)
u8string to_0xhex(unsigned long long val, u8char_type ca, unsigned pad_zeros)
template<typename Tchar>
bool is_whitespace(Tchar c)

Checks whether the specified character is a whitespace character.

template<>
inline bool is_whitespace(achar_type c)

Checks whether the specified character is a whitespace character.

template<typename Tchar>
bool is_line_break(Tchar c)

Checks whether the specified character is a line break character (LF or CR).

template<typename Tchar>
size_t is_line_break_strict(Tchar c0, Tchar c1 = 0)

Checks whether the specified character sequence represents a line break and, if yes, returns the number of characters (code units) involved. Possible combinations are (regardless of the current platform):

  • CRLF (\r\n): Windows, DOS

  • LF (\n): Unix, Linux, macOS, and “modern” line-ending styles in general

  • CR (\r): Legacy Mac This function enforces strict matching rules and requires c1 to be 0 for single-character line breaks (LF or CR).

template<typename Tchar>
size_t is_line_break_relaxed(Tchar c0, Tchar c1 = 0)

Checks whether the specified character sequence represents a line break and, if yes, returns the number of characters (code units) involved. Possible combinations are (regardless of the current platform):

  • CRLF (\r\n): Windows, DOS

  • LF (\n): Unix, Linux, macOS, and “modern” line-ending styles in general

  • CR (\r): Legacy Mac Unlike the strict version, this function does not require c1 to be 0 for single-byte line breaks.

template<class Tstring_view>
size_t is_line_break_prefix(Tstring_view s)

Checks whether the specified string starts with a line break and, if yes, returns the number of characters (code units) involved. Possible combinations are (regardless of the current platform):

  • CRLF (\r\n): Windows, DOS

  • LF (\n): Unix, Linux, macOS, and “modern” line-ending styles in general

  • CR (\r): Legacy Mac

template<class Tstring_view>
size_t is_line_break_suffix(Tstring_view s)

Checks whether the specified string ends with a line break and, if yes, returns the number of characters (code units) involved. Possible combinations are (regardless of the current platform):

  • CRLF (\r\n): Windows, DOS

  • LF (\n): Unix, Linux, macOS, and “modern” line-ending styles in general

  • CR (\r): Legacy Mac

template<class Tstring_view>
size_t count_whitespace_prefix(Tstring_view s)

Counts and returns the number of whitespace characters that begin the string.

template<>
inline size_t count_whitespace_prefix(u8string_view s)

Counts and returns the number of whitespace characters that begin the string. The number is calculated in terms of UTF-8 characters (code units), not in terms of Unicode code points.

template<class Tstring_view>
size_t count_whitespace_suffix(Tstring_view s)

Counts and returns the number of whitespace characters that end the string.

template<>
inline size_t count_whitespace_suffix(u8string_view s)

Counts and returns the number of whitespace characters that end the string. The number is calculated in terms of UTF-8 characters (code units), not in terms of Unicode code points.

template<class Tstring>
void ltrim(Tstring &s)
template<class Tstring>
void rtrim(Tstring &s)
template<class Tstring_view>
void ltrim(Tstring_view &s)
template<class Tstring_view>
void rtrim(Tstring_view &s)
template<class Tstring_or_view>
void trim(Tstring_or_view &s)
template<class Tstring_or_view>
Tstring_or_view ltrimmed(Tstring_or_view s)
template<class Tstring_or_view>
Tstring_or_view rtrimmed(Tstring_or_view s)
template<class Tstring_or_view>
Tstring_or_view trimmed(Tstring_or_view s)
template<class Tstring, typename Tchar = typename Tstring::value_type>
void lpad(Tstring &s, size_t min_length, Tchar c)
template<class Tstring, typename Tchar = typename Tstring::value_type>
void rpad(Tstring &s, size_t min_length, Tchar c)
template<class Tstring, typename Tchar = typename Tstring::value_type>
Tstring lpadded(Tstring s, size_t min_length, Tchar c)
template<class Tstring, typename Tchar = typename Tstring::value_type>
Tstring rpadded(Tstring s, size_t min_length, Tchar c)
template<class Tstring, typename Tval, typename Tchar = typename Tstring::value_type>
Tstring to_hex(Tval val, Tchar ca = Tchar('A'), unsigned pad_zeros = 0)
template<class Tstring, typename Tval, typename Tchar = typename Tstring::value_type>
Tstring to_0xhex(Tval val, Tchar ca = Tchar('A'), unsigned pad_zeros = 0)
template<class Tstring_or_view>
size_t levenshtein(const Tstring_or_view &s1, const Tstring_or_view &s2)

Calculates the Levenshtein distance between two strings. The difference is calculated in terms of characters (code units), not in terms of (Unicode) code points.

template<class Tstring_or_view, typename Tfloat = float>
Tfloat levenshtein_normalized(const Tstring_or_view &s1, const Tstring_or_view &s2)

Calculates a normalized Levenshtein distance between two strings on a single scale from 0 (“identical”) to 1 (“nothing in common”). The difference is calculated in terms of characters (code units), not in terms of (Unicode) code points.

Variables

constexpr unsigned _replacement_ascii = 0x1a
constexpr unsigned _replacement_unicode = 0xfffd
namespace system
namespace dl7
namespace compression

Functions

static bool _log_and_return(int z_return_code)

Logs an error message corresponding to the given return code (if not Z_OK) and returns false (if not Z_OK) or true (if Z_OK).

namespace json

Typedefs

using null_t = std::nullptr_t
using object_t = cl7::ordered_map<cl7::u8string, Json, cl7::u8string_view>
using array_t = std::vector<Json>
using string_t = cl7::u8string
using decimal_t = double
using integer_t = int64_t
using unsigned_t = uint64_t
using boolean_t = bool

Functions

static void _put_line_ending(cl7::u8osstream &oss, const JsonWriter::Format &format)
static void _start_item(cl7::u8osstream &oss, size_t depth, const JsonWriter::Format &format)
static void _end_item(cl7::u8osstream &oss, size_t index, size_t count, const JsonWriter::Format &format)
static cl7::u8osstream &_write_string(cl7::u8osstream &oss, cl7::u8string_view string, cl7::u8char_type quote_char, const JsonWriter::Format &format)
static cl7::u8osstream &_write_string(cl7::u8osstream &oss, cl7::u8string_view string, const JsonWriter::Format &format)
static cl7::u8osstream &_write_decimal(cl7::u8osstream &oss, decimal_t decimal, const JsonWriter::Format &format)
static cl7::u8osstream &_write_json(cl7::u8osstream &oss, const Json &json, size_t depth, const JsonWriter::Format &format)
namespace syntax

Typedefs

using SymbolID = signed

0 is reserved for the “EOF” symbol. Any negative value indicates an unrecognized character or an invalid token. Regular custom IDs can have any positive value.

Functions

static size_t _try_match_prefix(cl7::u8string_view literal, cl7::u8string_view source)
namespace ml7

Typedefs

using constants = constants_<float>

Functions

constexpr Angle operator*(float s, Angle a)

Scales a given angle by the specified scalar.

bool is_equal_ulps(float a, float b, int ulps)

Checks whether the specified floating point values are (approximately) equal.

bool is_less_ulps(float a, float b, int ulps)

Checks whether the value of a is less than the value of b.

bool is_less_equal_ulps(float a, float b, int ulps)

Checks whether the value of a is less than or equal to the value of b.

template<typename T>
constexpr T abs(T x)

Returns the absolute amount of the given value.

template<typename T>
constexpr T sgn(T x)

Returns -1, +1, or 0 according to whether the sign of the given value is negative, positive, or zero itself, respectively.

template<typename T>
constexpr T step(T x, T edge = T(0))

Returns 1 if x >= edge, 0 otherwise.

template<typename T>
constexpr T smoothstep(T x, T min, T max)

Returns 0 if x is less than min, 1 if x is greater than max, and a value between 0 and 1 otherwise using a Hermite polynomial.

template<typename T>
constexpr T min2(T a, T b)

Returns the less value of two given values.

template<typename T>
constexpr T max2(T a, T b)

Returns the greater value of two given values.

template<typename T>
constexpr T min3(T a, T b, T c)

Returns the smallest value of three given values.

template<typename T>
constexpr T max3(T a, T b, T c)

Returns the greatest value of three given values.

template<typename T>
constexpr T clamp(T x, T min, T max)

Clamps the given value to lie within the range [min; max].

template<typename T>
T round(T x)

Rounds the given value to the closest “integer” value.

template<typename T>
T round(T x, unsigned num_decimals)

Rounds the given value to the specified number of decimal places.

template<typename T, unsigned num_decimals>
T round(T x)

Rounds the given value to the specified number of decimal places.

template<typename T>
constexpr bool is_zero(T x, T epsilon = std::numeric_limits<T>::epsilon())

Checks whether the specified floating point value is (approximately) zero.

template<typename T>
constexpr bool is_one(T x, T epsilon = std::numeric_limits<T>::epsilon())

Checks whether the specified floating point value is (approximately) one.

template<typename T>
constexpr bool is_one_sqr(T sqr, T epsilon = std::numeric_limits<T>::epsilon())

Checks whether the specified (squared) floating point value is (approximately) one squared.

template<typename T>
constexpr bool is_equal(T a, T b, T epsilon = std::numeric_limits<T>::epsilon())

Checks whether the specified floating point values are (approximately) equal.

template<typename T>
constexpr bool is_less(T a, T b, T epsilon = std::numeric_limits<T>::epsilon())

Checks whether the value of a is less than the value of b.

template<typename T>
constexpr bool is_less_equal(T a, T b, T epsilon = std::numeric_limits<T>::epsilon())

Checks whether the value of a is less than or equal to the value of b.

template<typename T>
constexpr bool is_greater(T a, T b, T epsilon = std::numeric_limits<T>::epsilon())

Checks whether the value of a is greater than the value of b.

template<typename T>
constexpr bool is_greater_equal(T a, T b, T epsilon = std::numeric_limits<T>::epsilon())

Checks whether the value of a is greater than or equal to the value of b.

inline bool is_greater_ulps(float a, float b, int ulps)

Checks whether the value of a is less than the value of b.

inline bool is_greater_equal_ulps(float a, float b, int ulps)

Checks whether the value of a is less than or equal to the value of b.

template<typename T>
constexpr T deg_to_rad(T degrees)

Transforms a given angle in degrees to radians.

template<typename T>
constexpr T rad_to_deg(T radians)

Transforms a given angle in radians to degrees.

template<typename T>
constexpr bool is_power_of_2(T x)

Checks whether the given value is a power of two.

template<typename T>
constexpr T prev_power_of_2(T x)

Returns the highest power of two value that is less than or equal to the specified non-zero value. If the value is 0, 0 is returned.

template<typename T>
constexpr T next_power_of_2(T x)

Returns the lowest power of two value that is greater than or equal to the specified value. If such a value does not exist (regarding integer overflow), 0 is returned.

constexpr Matrix2x2 operator*(float s, const Matrix2x2 &m)

“Scales” a matrix by the specified factor (scalar multiplication).

constexpr Matrix2x3 operator*(float s, const Matrix2x3 &m)

“Scales” a matrix by the specified factor (scalar multiplication).

constexpr Matrix3x3 operator*(float s, const Matrix3x3 &m)

“Scales” a matrix by the specified factor (scalar multiplication).

constexpr Matrix3x4 operator*(float s, const Matrix3x4 &m)

“Scales” a matrix by the specified factor (scalar multiplication).

constexpr Matrix4x4 operator*(float s, const Matrix4x4 &m)

“Scales” a matrix by the specified factor (scalar multiplication).

constexpr Quaternion operator*(float s, const Quaternion &q)

“Scales” a quaternion by the specified factor (scalar multiplication).

constexpr Vector2 operator*(float s, const Vector2 &v)

Scales a vector by the specified factor (scalar multiplication).

constexpr Vector3 operator*(float s, const Vector3 &v)

Scales a vector by the specified factor (scalar multiplication).

constexpr Vector4 operator*(float s, const Vector4 &v)

Scales a vector by the specified factor (scalar multiplication).

namespace pl7
namespace std

Functions

cl7::u8isstream &getline(cl7::u8isstream &input, cl7::u8string &str, cl7::u8char_type delim)
namespace tl7

This entire testing module is heavily inspired by the C++ implementation of the “doctest” testing framework: https://github.com/doctest/doctest

Typedefs

using TestCasePtr = std::unique_ptr<TestCase>
namespace exceptions
namespace internals

Functions

cl7::u8string to_string(const std::nullptr_t &null)
template<class Tstring_or_view>
static cl7::u8string _to_string(const Tstring_or_view &val)
cl7::u8string to_string(const std::string &val)
cl7::u8string to_string(const std::wstring &val)
cl7::u8string to_string(const std::u8string &val)
cl7::u8string to_string(const std::u16string &val)
cl7::u8string to_string(const std::u32string &val)
cl7::u8string to_string(std::string_view val)
cl7::u8string to_string(std::wstring_view val)
cl7::u8string to_string(std::u8string_view val)
cl7::u8string to_string(std::u16string_view val)
cl7::u8string to_string(std::u32string_view val)
cl7::u8string to_string(const char *val)
cl7::u8string to_string(const wchar_t *val)
cl7::u8string to_string(const char8_t *val)
cl7::u8string to_string(const char16_t *val)
cl7::u8string to_string(const char32_t *val)
static constexpr int consume(const int *foo, int reg) noexcept
inline cl7::u8string to_string(signed val)
inline cl7::u8string to_string(signed long val)
inline cl7::u8string to_string(signed long long val)
inline cl7::u8string to_string(unsigned val)
inline cl7::u8string to_string(unsigned long val)
inline cl7::u8string to_string(unsigned long long val)
inline cl7::u8string to_string(float val)
inline cl7::u8string to_string(double val)
inline cl7::u8string to_string(long double val)
inline cl7::u8string to_string(bool val)
namespace reporting

Enums

enum ColorCode

Values:

enumerator Black
enumerator Red
enumerator Green
enumerator Yellow
enumerator Blue
enumerator Magenta
enumerator Cyan
enumerator LightGray
enumerator DarkGray
enumerator LightRed
enumerator LightGreen
enumerator LightYellow
enumerator LightBlue
enumerator LightMagenta
enumerator LightCyan
enumerator White
enumerator None
enumerator Default
enumerator Success
enumerator Warning
enumerator Error
enumerator Info
enumerator Code

Functions

static auto &_cout()
template<class Tcout>
static Tcout &operator<<(Tcout &cout, ColorCode color_code)
template<class Tcout>
static Tcout &operator<<(Tcout &cout, cl7::u8string_view u8s)
static cl7::u8string_view _file_path(const char *file_path)
static cl7::u8string_view _directory_path(cl7::u8string_view file_path)
static cl7::u8string_view _filename(cl7::u8string_view file_path)
namespace xl7

Functions

inline MainWindow &main_window()
namespace audio
namespace graphics

Enums

enum class ChannelFlags

Values:

enumerator Red
enumerator Green
enumerator Blue
enumerator Alpha
enumerator RGB
enumerator All
enum class ChannelOrder

Values:

enumerator RGBA
enumerator ARGB
enumerator ABGR
enumerator BGRA
enum class ClearFlags

Values:

enumerator ColorBuffer
enumerator DepthBuffer
enumerator StencilBuffer
enumerator DepthStencilBuffer
enumerator All
enum class ComparisonFunction

Values:

enumerator Never
enumerator Less
enumerator Equal
enumerator LessEqual
enumerator Greater
enumerator NotEqual
enumerator GreaterEqual
enumerator Always
enum class DepthStencilFormat

Values:

enumerator UNKNOWN
enumerator D16
enumerator D32
enumerator D15S1
enumerator D24S8
enumerator D24X8
enumerator D32S8X24
enum class PixelFormat

Values:

enumerator UNKNOWN
enumerator R8_UNORM
enumerator R8_SNORM
enumerator R8_UINT
enumerator R8_SINT
enumerator R16_UNORM
enumerator R16_SNORM
enumerator R16_UINT
enumerator R16_SINT
enumerator R16_FLOAT
enumerator R32_UINT
enumerator R32_SINT
enumerator R32_FLOAT
enumerator R8G8_UNORM
enumerator R8G8_SNORM
enumerator R8G8_UINT
enumerator R8G8_SINT
enumerator R16G16_UNORM
enumerator R16G16_SNORM
enumerator R16G16_UINT
enumerator R16G16_SINT
enumerator R16G16_FLOAT
enumerator R32G32_UINT
enumerator R32G32_SINT
enumerator R32G32_FLOAT
enumerator R4G4B4X4_UNORM
enumerator R5G5B5X1_UNORM
enumerator R5G6B5_UNORM
enumerator R8G8B8_UNORM
enumerator R8G8B8_SNORM
enumerator R8G8B8_UINT
enumerator R8G8B8_SINT
enumerator R8G8B8X8_UNORM
enumerator R11G11B10_FLOAT
enumerator R32G32B32_UINT
enumerator R32G32B32_SINT
enumerator R32G32B32_FLOAT
enumerator R4G4B4A4_UNORM
enumerator R5G5B5A1_UNORM
enumerator R8G8B8A8_UNORM
enumerator R8G8B8A8_SNORM
enumerator R8G8B8A8_UINT
enumerator R8G8B8A8_SINT
enumerator R10G10B10A2_UNORM
enumerator R10G10B10A2_UINT
enumerator R16G16B16A16_UNORM
enumerator R16G16B16A16_SNORM
enumerator R16G16B16A16_UINT
enumerator R16G16B16A16_SINT
enumerator R16G16B16A16_FLOAT
enumerator R32G32B32A32_UINT
enumerator R32G32B32A32_SINT
enumerator R32G32B32A32_FLOAT
enumerator A8_UNORM

Functions

inline GraphicsSystem &graphics_system()
inline RenderingDevice *rendering_device()
inline RenderingContext *primary_context()
inline RenderingContext *rendering_context(unsigned index = 0)
inline surfaces::SurfaceManager *surface_manager()
inline textures::TextureManager *texture_manager()
inline meshes::MeshManager *mesh_manager()
inline shaders::ShaderManager *shader_manager()
inline states::StateManager *state_manager()
inline ChannelFlags operator|(ChannelFlags a, ChannelFlags b)
inline ChannelFlags operator&(ChannelFlags a, ChannelFlags b)
inline ClearFlags operator|(ClearFlags a, ClearFlags b)
inline ClearFlags operator&(ClearFlags a, ClearFlags b)
constexpr Color operator*(float s, const Color &c)
template<class TShader>
static void _resolve_shader_states(RenderingDevice *_rendering_device, RenderingContext::ResolvedShaderStates<TShader> &resolved_shader_states, pipeline::AbstractShaderStage &pipeline_as)
namespace images

Enums

enum class ResamplingMethod

Values:

enumerator NearestNeighbor
enumerator LinearInterpolation

Functions

template<size_t stride>
static cl7::byte_vector _nearest_neighbor(const Image &source_image, unsigned width, unsigned height, unsigned depth)
template<size_t stride>
static cl7::byte_vector _mipmap1_u8(const Image &source_image)
template<size_t stride>
static cl7::byte_vector _mipmap2_u8(const Image &source_image)
template<size_t stride>
static cl7::byte_vector _mipmap3_u8(const Image &source_image)
static cl7::byte_vector _linear_interpolation(const Image &source_image, unsigned width, unsigned height, unsigned depth)
namespace impl
namespace direct3d11

Functions

static UINT _d3d_clear_flags_from(ClearFlags clear_flags)
static D3D11_PRIMITIVE_TOPOLOGY _d3d_primitive_topology_from(xl7::graphics::meshes::Topology topology)
static D3D11_VIEWPORT _d3d_viewport_from(const Viewport &viewport)
static LPCSTR _d3d_semantic_name_from(xl7::graphics::meshes::VertexLayout::Semantic semantic)
static DXGI_FORMAT _dxgi_format_from(xl7::graphics::meshes::VertexLayout::DataType data_type)
namespace errors

Functions

cl7::u8string dxgi_result(long error_code)
cl7::u8string dxgi_result(long error_code, cl7::u8string_view context)
cl7::u8string d3d11_result(long error_code)
cl7::u8string d3d11_result(long error_code, cl7::u8string_view context)
namespace mappings

Functions

D3D11_USAGE _d3d_usage_from(resources::ResourceUsage resource_usage)
DXGI_FORMAT _dxgi_format_from(PixelFormat pixel_format, ChannelOrder channel_order)
std::pair<PixelFormat, ChannelOrder> _map_dxgi_format(DXGI_FORMAT d3d_format, ChannelOrder preferred_channel_order)
D3D11_COMPARISON_FUNC _d3d_comparison_func_from(ComparisonFunction comparison_function)
namespace meshes

Functions

static DXGI_FORMAT _dxgi_format_from(xl7::graphics::meshes::IndexType index_type)
namespace shaders
namespace states

Functions

static D3D11_BLEND _d3d_blend_from(xl7::graphics::states::BlendState::BlendFactor blend_factor)
static D3D11_BLEND_OP _d3d_blend_op_from(xl7::graphics::states::BlendState::BlendOperation blend_operation)
static UINT8 _d3d_render_target_write_mask_from(xl7::graphics::ChannelFlags channel_write_flags)
static D3D11_STENCIL_OP _d3d_stencil_op_from(xl7::graphics::states::DepthStencilState::StencilOperation stencil_operation)
static D3D11_FILL_MODE _d3d_fill_mode_from(xl7::graphics::states::RasterizerState::FillMode fill_mode)
static D3D11_CULL_MODE _d3d_cull_mode_from(xl7::graphics::states::RasterizerState::CullMode cull_mode)
static BOOL _d3d_front_counter_clockwise_from(xl7::graphics::states::RasterizerState::WindingOrder winding_order)
static D3D11_FILTER _d3d_filter_from(xl7::graphics::states::SamplerState::MinMagFilterType min_filter_type, xl7::graphics::states::SamplerState::MinMagFilterType mag_filter_type, xl7::graphics::states::SamplerState::MipFilterType mip_filter_type)
static D3D11_TEXTURE_ADDRESS_MODE _d3d_texture_address_mode_from(xl7::graphics::states::SamplerState::AddressMode address_mode)
namespace textures
namespace direct3d9

Functions

static DWORD _d3d_clear_flags_from(ClearFlags clear_flags)
static D3DPRIMITIVETYPE _d3d_primitive_type_from(xl7::graphics::meshes::Topology topology)
static BYTE _d3d_vertex_element_usage_from(xl7::graphics::meshes::VertexLayout::Semantic semantic)
static BYTE _d3d_vertex_element_type_from(xl7::graphics::meshes::VertexLayout::DataType data_type)
static D3DVIEWPORT9 _d3d_viewport_from(const Viewport &viewport)
namespace errors

Functions

cl7::u8string d3d9_result(long error_code)
cl7::u8string d3d9_result(long error_code, cl7::u8string_view context)
namespace mappings

Functions

DWORD _d3d_usage_from(resources::ResourceUsage resource_usage)
DWORD _d3d_usage_from(resources::ResourceUsage resource_usage, unsigned mip_levels)
D3DPOOL _d3d_pool_from(resources::ResourceUsage resource_usage)
D3DFORMAT _d3d_format_from(PixelFormat pixel_format, ChannelOrder channel_order)
std::pair<PixelFormat, ChannelOrder> _map_d3d_format(D3DFORMAT d3d_format, ChannelOrder preferred_channel_order)
D3DCMPFUNC _d3d_cmp_func_from(ComparisonFunction comparison_function)
namespace meshes

Functions

static D3DFORMAT _d3d_format_from(xl7::graphics::meshes::IndexType index_type)
static DWORD _d3d_fvf_from(const xl7::graphics::meshes::VertexLayout &vertex_layout)
namespace shaders
namespace states

Typedefs

using D3DBlendStateTypeValues = std::array<std::pair<D3DRENDERSTATETYPE, DWORD>, D3D_BLEND_STATE_TYPE_COUNT>
using D3DDepthStencilStateTypeValues = std::array<std::pair<D3DRENDERSTATETYPE, DWORD>, D3D_DEPTH_STENCIL_STATE_TYPE_COUNT>
using D3DRasterizerStateTypeValues = std::array<std::pair<D3DRENDERSTATETYPE, DWORD>, D3D_RASTERIZER_STATE_TYPE_COUNT>
using D3DSamplerStateTypeValues = std::array<std::pair<D3DSAMPLERSTATETYPE, DWORD>, D3D_SAMPLER_STATE_TYPE_COUNT>

Functions

static D3DBLEND _d3d_blend_from(xl7::graphics::states::BlendState::BlendFactor blend_factor)
static D3DBLENDOP _d3d_blend_op_from(xl7::graphics::states::BlendState::BlendOperation blend_operation)
static DWORD _d3d_color_write_enable_from(xl7::graphics::ChannelFlags channel_write_flags)
static D3DSTENCILOP _d3d_stencil_op_from(xl7::graphics::states::DepthStencilState::StencilOperation stencil_operation)
static D3DFILLMODE _d3d_fill_mode_from(xl7::graphics::states::RasterizerState::FillMode fill_mode)
static D3DCULL _d3d_cull_from(xl7::graphics::states::RasterizerState::CullMode cull_mode, xl7::graphics::states::RasterizerState::WindingOrder winding_order)
static D3DTEXTUREADDRESS _d3d_texture_address_from(xl7::graphics::states::SamplerState::AddressMode address_mode)
static D3DTEXTUREFILTERTYPE _d3d_texture_filter_type_from(xl7::graphics::states::SamplerState::MinMagFilterType filter_type)
static D3DTEXTUREFILTERTYPE _d3d_texture_filter_type_from(xl7::graphics::states::SamplerState::MipFilterType filter_type)

Variables

static constexpr size_t D3D_BLEND_STATE_TYPE_COUNT = 9
static constexpr size_t D3D_DEPTH_STENCIL_STATE_TYPE_COUNT = 14
static constexpr size_t D3D_RASTERIZER_STATE_TYPE_COUNT = 2
static constexpr size_t D3D_SAMPLER_STATE_TYPE_COUNT = 13
namespace textures
namespace shared
namespace errors

Functions

cl7::u8string dxgi_result(long error_code)
cl7::u8string dxgi_result(long error_code, cl7::u8string_view context)
cl7::u8string d3d_result(long error_code)
cl7::u8string d3d_result(long error_code, cl7::u8string_view context)
namespace meshes
namespace shaders
namespace meshes

Enums

enum class IndexType

Values:

enumerator UINT16
enumerator UINT32
enum class Topology

Values:

enumerator Undefined
enumerator PointList
enumerator LineList
enumerator LineStrip
enumerator TriangleList
enumerator TriangleStrip
namespace pipeline
namespace shaders

Enums

enum class ConstantClass

Values:

enumerator Scalar

The shader constant is a scalar.

enumerator Vector

The shader constant is a vector.

enumerator MatrixRows

The shader constant is a row-major matrix (consecutive elements of a row reside next to each other).

enumerator MatrixColumns

The shader constant is a column-major matrix (consecutive elements of a column reside next to each other).

enum class ConstantType

Values:

enumerator Bool

The constant is a Boolean.

enumerator Int

The constant is an integer.

enumerator Float

The constant is a floating-point number.

namespace states

Functions

template<class TDesc>
static cl7::u8string _identifier(cl7::u8string_view type_string, const TDesc &desc)
namespace surfaces
namespace textures
namespace input
namespace resources

Enums

enum class ResourceUsage

A good read for this: https://developer.nvidia.com/sites/default/files/akamai/gamedev/files/gdc12/Efficient_Buffer_Management_McDonald.pdf

Values:

enumerator Default

A non-static/”reusable” resource that is expected to last for “a while”.

enumerator Immutable

A static resource whose data cannot be changed once it has been acquired.

enumerator Dynamic

A dynamic/volatile resource that will be updated very frequently (e.g., once per frame).

Functions

template<class T1, class T2>
auto operator==(T1 a, T2 b) noexcept
template<class T1, class T2>
auto operator!=(T1 a, T2 b) noexcept
template<class T1, class T2>
T1 id_cast(T2 other)
file auto_invoke.h
#include <CoreLabs/root.h>
#include <utility>
file bits.cpp
#include “bits.h
file bits.h
#include <CoreLabs/root.h>
#include <bit>
file byte_span.h
#include <CoreLabs/root.h>
#include <span>
file byte_vector.h
#include <CoreLabs/root.h>
#include <vector>
file byte_view.h
#include <CoreLabs/root.h>
#include <span>
file Singleton.cpp
#include “Singleton.h
#include <algorithm>
#include <memory>
file Singleton.h
#include <CoreLabs/root.h>
#include <vector>
file filesystem.cpp
#include “filesystem.h
#include <CoreLabs/strings.h>
#include <windows.h>
#include <shlobj.h>
file filesystem.h
#include <CoreLabs/string.h>
file Guid.cpp
#include “Guid.h
file Guid.h
#include <CoreLabs/string.h>
#include <array>
file io.h
#include “./io/file.h
file byte_reader.cpp
#include “byte_reader.h
file byte_reader.h
#include “./irom.h
#include “CoreLabs/byte_vector.h
#include “CoreLabs/byte_span.h
file byte_writer.cpp
#include “byte_writer.h
file byte_writer.h
#include “./ifile.h
#include “CoreLabs/byte_view.h
file file.cpp
#include “file.h
#include <algorithm>
#include <filesystem>
file file.h
#include “./ifile.h
#include “./open_mode.h
#include <CoreLabs/string.h>
#include <fstream>
file ifile.h
#include “./irom.h
file irom.h
#include “./seek_mode.h
file open_mode.h
#include <CoreLabs/root.h>
file seek_mode.h
#include <CoreLabs/root.h>
file utf8_reader.cpp
#include “utf8_reader.h
#include <CoreLabs/strings.h>
file utf8_reader.h
#include “./irom.h
#include “CoreLabs/string.h
file utf8_writer.cpp
#include “utf8_writer.h
file utf8_writer.h
#include “./ifile.h
#include “CoreLabs/string.h
file iterators.h
#include <CoreLabs/root.h>
#include <vector>
file logging.cpp
#include “logging.h
file logging.h

Defines

LOG(msg)
LOG_INFO(msg)
LOG_SUCCESS(msg)
LOG_WARNING(msg)
LOG_ERROR(msg)
LOG_TYPE(msg, type)
file AbstractLogHandler.cpp
#include “AbstractLogHandler.h
file AbstractLogHandler.h
#include “./LogEntry.h
file CoutLogHandler.cpp
#include “CoutLogHandler.h
#include <CoreLabs/strings.h>
#include <iostream>
file CoutLogHandler.h
#include “./AbstractLogHandler.h
file FileLogHandler.cpp
#include “FileLogHandler.h
#include <CoreLabs/sstream.h>
#include <CoreLabs/strings.h>
#include <chrono>
#include <fstream>
file FileLogHandler.h
#include “./AbstractLogHandler.h
file HtmlLogHandler.cpp
#include “HtmlLogHandler.h
#include <CoreLabs/sstream.h>
#include <CoreLabs/strings.h>
#include <chrono>
#include <fstream>
file HtmlLogHandler.h
#include “./AbstractLogHandler.h
file LogEntry.h
#include “./LogType.h
#include <CoreLabs/string.h>
file Logger.cpp
#include “Logger.h
#include <algorithm>
file Logger.h
#include “./AbstractLogHandler.h
#include “./LogEntry.h
#include <vector>
file LogType.h
#include <CoreLabs/root.h>
file StandardLogger.cpp
#include “StandardLogger.h
#include “./CoutLogHandler.h
file StandardLogger.h
#include “./Logger.h
file memory.cpp
#include “memory.h
#include <CoreLabs/sstream.h>
#include <vector>
file memory.h
#include <CoreLabs/string.h>
file ordered_map.h
#include <set>
#include <vector>
file profiling.h
file Profiler.cpp
#include “Profiler.h
#include “./StandardRegistry.h
file Profiler.h
#include “./Sample.h
file Registry.cpp
#include “Registry.h
#include <CoreLabs/strings.h>
#include <CoreLabs/sstream.h>
file Registry.h
#include “./Sample.h
#include “./SampleHandler.h
#include “../logging/Logger.h
#include <vector>
#include <map>
file Sample.h
#include <CoreLabs/string.h>
file SampleHandler.cpp
#include “Registry.h
file SampleHandler.h
#include “./Sample.h
#include “./Stopwatch.h
file StandardRegistry.cpp
#include “StandardRegistry.h
file StandardRegistry.h
#include “./Registry.h
file Stopwatch.cpp
#include “Stopwatch.h
file Stopwatch.h
#include <CoreLabs/root.h>
#include <chrono>
file root.cpp
#include “root.h
file root.h
#include <sdkddkver.h>
#include <cassert>
#include <memory>

Defines

_WIN32_WINNT
PPCAT_NX(A, B)

Concatenate preprocessor tokens A and B without expanding macro definitions (however, if invoked from a macro, macro arguments are expanded).

PPCAT(A, B)

Concatenate preprocessor tokens A and B after macro-expanding them.

STRINGIZE_NX(A)

Turn A into a string literal without expanding macro definitions (however, if invoked from a macro, macro arguments are expanded).

STRINGIZE(A)

Turn A into a string literal after macro-expanding it.

file sstream.cpp
#include “sstream.h
#include <CoreLabs/strings.h>
file sstream.h
#include <CoreLabs/string.h>
#include <sstream>
file string.cpp
#include “sstream.h
#include “strings.h
file string.h
#include <CoreLabs/root.h>
#include <string>
file strings.cpp
#include “strings.h
#include <CoreLabs/logging.h>
file strings.h
#include <CoreLabs/string.h>
#include <algorithm>
#include <bit>
file CPUID.cpp
#include “CPUID.h
#include <thread>
file CPUID.h
#include <CoreLabs/string.h>
file datetime.cpp
#include “datetime.h
#include <chrono>
file datetime.h
#include <CoreLabs/root.h>
file MemoryStatus.cpp
#include “MemoryStatus.h
#include <CoreLabs/logging.h>
#include <CoreLabs/errors.h>
#include <sys/sysinfo.h>
file MemoryStatus.h
#include <CoreLabs/root.h>
file user.cpp
#include “user.h
#include <CoreLabs/errors.h>
#include <CoreLabs/logging.h>
#include <CoreLabs/strings.h>
#include <windows.h>
#include <security.h>

Defines

SECURITY_WIN32
file user.h
#include <CoreLabs/string.h>
file utilities.h
#include <CoreLabs/root.h>
file Version.cpp
#include “Version.h
#include <CoreLabs/sstream.h>
file Version.h
#include <CoreLabs/string.h>
file Base64.cpp
#include “Base64.h
file Base64.h
#include <CoreLabs/string.h>
file compression.h
#include “./compression/Deflate.h
file Deflate.cpp
#include “Deflate.h
#include <CoreLabs/logging.h>
#include <zlib.h>

Defines

ZLIB_CONST
ZLIB_WINAPI
file Deflate.h
file Json.cpp
#include “Json.h
#include “./JsonWriter.h
#include <utility>
file Json.h
#include “./types.h
#include <variant>
file JsonWriter.cpp
#include “JsonWriter.h
#include <CoreLabs/sstream.h>
#include <cmath>
#include <format>
file JsonWriter.h
#include “./Json.h
file types.h
#include <CoreLabs/string.h>
#include <vector>
file Diagnostic.h
#include “./SourceLocation.h
#include <CoreLabs/string.h>
file Diagnostics.cpp
#include “Diagnostics.h
file Diagnostics.h
#include “./Diagnostic.h
#include <vector>
file GenericLexer.cpp
#include “GenericLexer.h
file GenericLexer.h
#include “./Lexer.h
file Grammar.h
file GrammarAnalyzer.cpp
#include “GrammarAnalyzer.h
#include <optional>
#include <CoreLabs/logging.h>
#include <unordered_set>
file GrammarAnalyzer.h
#include “./Grammar.h
file Lexer.cpp
#include “Lexer.h
#include <CoreLabs/strings.h>
file Lexer.h
#include “./SourceLocation.h
#include “./TerminalSymbol.h
#include “./Token.h
#include <CoreLabs/string.h>
#include <vector>
file Parser.cpp
#include “Parser.h
file Parser.h
#include “./Grammar.h
#include “./Token.h
#include <CoreLabs/string.h>
#include <vector>
file ProductionRule.cpp
#include “ProductionRule.h
file ProductionRule.h
#include “./SymbolID.h
#include <vector>
file ProductionRuleCollection.cpp
#include <algorithm>
file ProductionRuleCollection.h
#include “./ProductionRule.h
#include <vector>
file SourceLocation.h
#include <CoreLabs/root.h>
file SymbolID.h
#include <CoreLabs/root.h>
file TerminalSymbol.cpp
#include “TerminalSymbol.h
file TerminalSymbol.h
#include “./SymbolID.h
#include <CoreLabs/string.h>
#include <regex>
file TerminalSymbolCollection.cpp
#include <algorithm>
file TerminalSymbolCollection.h
#include “./TerminalSymbol.h
#include <vector>
file Token.h
#include “./TerminalSymbol.h
#include “./SourceLocation.h
#include <CoreLabs/string.h>
file Vocabulary.cpp
#include “Vocabulary.h
file Vocabulary.h
#include “./SymbolID.h
#include <CoreLabs/string.h>
#include <unordered_map>
file Angle.cpp
#include “Angle.h
file Angle.h
#include <MathLabs/math.h>
file constants.h
#include <CoreLabs/root.h>
#include <numbers>
file functions.cpp
#include “functions.h
file functions.h
#include <CoreLabs/root.h>
#include <cmath>
file math.h
file Matrix2x2.cpp
#include “Matrix2x2.h
file Matrix2x2.h
#include “./Vector2.h
file Matrix2x3.cpp
#include “Matrix2x3.h
file Matrix2x3.h
#include “./Matrix2x2.h
#include “./Vector2.h
file Matrix3x3.cpp
#include “Matrix3x3.h
file Matrix3x3.h
#include “./Vector3.h
file Matrix3x4.cpp
#include “Matrix3x4.h
file Matrix3x4.h
#include “./Matrix3x3.h
#include “./Vector3.h
file Matrix4x4.cpp
#include “Matrix4x4.h
file Matrix4x4.h
#include “./Matrix3x4.h
#include “./Matrix3x3.h
#include “./Vector4.h
#include “./Vector3.h
file Quaternion.cpp
#include “Quaternion.h
file Quaternion.h
#include “./Matrix3x3.h
#include “./Vector3.h
file Vector2.cpp
#include “Vector2.h
file Vector2.h
#include <MathLabs/math.h>
file Vector3.cpp
#include “Vector3.h
file Vector3.h
#include <MathLabs/math.h>
file Vector4.cpp
#include “Vector4.h
file Vector4.h
#include “./Vector3.h
file Application.cpp
#include “Application.h
#include <CoreLabs/logging.h>
#include <CoreLabs/strings.h>
#include <CoreLabs/memory.h>
file Application.h
#include <XiaoLabs/Config.h>
#include “./ArgumentBag.h
file ArgumentBag.cpp
#include “ArgumentBag.h
#include <CoreLabs/strings.h>
#include <regex>
#include <utility>
file ArgumentBag.h
#include <CoreLabs/string.h>
#include <vector>
#include <unordered_set>
#include <unordered_map>
file Context.cpp
#include “Context.h
file Context.h
#include “./reporting/IListener.h
#include “./reporting/Reporter.h
#include “./SubcaseContext.h
#include “./Meta.h
#include “./Result.h
#include “./Stats.h
file assertion_exception.h
#include “../Meta.h
file internals.cpp
#include “internals.h
#include <CoreLabs/sstream.h>
#include <iomanip>
file internals.h
#include <CoreLabs/string.h>
#include <cfloat>

Defines

TL7_INTERNAL_DEFINE_AND_REGISTER_GLOBAL_FUNC(func, name)
TL7_INTERNAL_REGISTER_GLOBAL_FUNC(func, name)
TL7_INTERNAL_CONSUME_REGISTRATION(foo, reg)
TL7_INTERNAL_DEFINE_AND_SWITCH_SUBCASE_BRANCH(subcase, name)
TL7_INTERNAL_DEFINE_AND_SWITCH_SUBCASE_ITERATION_BRANCH(subcase, name, iteration_number)
TL7_INTERNAL_DEFINE_AND_SWITCH_SUBCASE_BATCH_ITERATION_BRANCH(subcase, name, iteration_number, iterable_data_container, data, tmp, stringifiable)
TL7_INTERNAL_TRY_SET_SUBCASE_DATA(stringifiable)
TL7_INTERNAL_SET_SUBCASE_DATA(stringifiable)
TL7_INTERNAL_TRY_POST_RESULT_1(expression, make_result, macro_base)
TL7_INTERNAL_TRY_POST_RESULT_2(expr1, expr2, make_result, macro_base, op)
TL7_INTERNAL_TRY_POST_RESULT_EQ_FLT(expr1, expr2, make_result, macro_base, op)
TL7_INTERNAL_TRY_POST_RESULT_EQ_DBL(expr1, expr2, make_result, macro_base, op)
TL7_INTERNAL_TRY_POST_RESULT_EQ_STR(expr1, expr2, make_result, macro_base, op)
file macros.h
#include <CoreLabs/root.h>

Defines

TESTLABS_CASE(name)
TESTLABS_SUBCASE(name)
TESTLABS_SUBCASE_ITERATION(name, iteration_number)
TESTLABS_SUBCASE_BATCH(name, iterable_data_container, data)
TESTLABS_SUBCASE_BATCH_WITH_DATA_STRING(name, iterable_data_container, data, stringifiable)
TESTLABS_SUBCASE_DATA_STRING(stringifiable)
TESTLABS_CHECK(expression)
TESTLABS_CHECK_EQ(expr1, expr2)
TESTLABS_CHECK_NE(expr1, expr2)
TESTLABS_CHECK_LT(expr1, expr2)
TESTLABS_CHECK_GT(expr1, expr2)
TESTLABS_CHECK_LE(expr1, expr2)
TESTLABS_CHECK_GE(expr1, expr2)
TESTLABS_CHECK_EQ_FLT(expr1, expr2)
TESTLABS_CHECK_EQ_DBL(expr1, expr2)
TESTLABS_CHECK_EQ_STR(expr1, expr2)
TESTLABS_PRESUME(expression)
TESTLABS_PRESUME_EQ(expr1, expr2)
TESTLABS_PRESUME_NE(expr1, expr2)
TESTLABS_PRESUME_LT(expr1, expr2)
TESTLABS_PRESUME_GT(expr1, expr2)
TESTLABS_PRESUME_LE(expr1, expr2)
TESTLABS_PRESUME_GE(expr1, expr2)
TESTLABS_PRESUME_EQ_FLT(expr1, expr2)
TESTLABS_PRESUME_EQ_DBL(expr1, expr2)
TESTLABS_PRESUME_EQ_STR(expr1, expr2)
TESTLABS_ASSERT(expression)
TESTLABS_ASSERT_EQ(expr1, expr2)
TESTLABS_ASSERT_NE(expr1, expr2)
TESTLABS_ASSERT_LT(expr1, expr2)
TESTLABS_ASSERT_GT(expr1, expr2)
TESTLABS_ASSERT_LE(expr1, expr2)
TESTLABS_ASSERT_GE(expr1, expr2)
TESTLABS_ASSERT_EQ_FLT(expr1, expr2)
TESTLABS_ASSERT_EQ_DBL(expr1, expr2)
TESTLABS_ASSERT_EQ_STR(expr1, expr2)
file Meta.h
#include “./Signature.h
#include <CoreLabs/string.h>
file CoutLogger.cpp
#include “CoutLogger.h
#include <CoreLabs/strings.h>
#include <iostream>
#include <iomanip>
file CoutLogger.h
#include “./IListener.h
#include “../Result.h
#include “../Stats.h
#include <vector>
#include <map>
file IListener.h
#include “../Meta.h
#include “../Result.h
#include “../Stats.h
file Reporter.cpp
#include “Reporter.h
#include <algorithm>
file Reporter.h
#include “./IListener.h
#include “../Meta.h
#include “../Result.h
#include “../Stats.h
#include <vector>
file Result.cpp
#include “Result.h
file Result.h
#include “./Meta.h
file ResultBuilder.cpp
#include “ResultBuilder.h
file ResultBuilder.h
#include “./Result.h
#include “./Context.h
file Signature.cpp
#include “Signature.h
file Signature.h
#include <CoreLabs/string.h>
file Stats.cpp
#include “Stats.h
#include <cstring>
file Stats.h
#include “./Result.h
file SubcaseBranchSwitch.cpp
#include “SubcaseBranchSwitch.h
file SubcaseBranchSwitch.h
#include “./Context.h
file SubcaseContext.cpp
#include “SubcaseContext.h
file SubcaseContext.h
#include “./Meta.h
#include “./Signature.h
#include <vector>
#include <unordered_set>
file TestCase.cpp
#include “TestCase.h
file TestCase.h
#include “./Meta.h
#include “./Context.h
#include <CoreLabs/string.h>
file TestSuite.cpp
#include “TestSuite.h
#include “./ResultBuilder.h
#include <CoreLabs/strings.h>
file TestSuite.h
#include “./TestCase.h
#include “./SubcaseBranchSwitch.h
#include “./Context.h
#include “./ResultBuilder.h
#include “./Result.h
#include “./Stats.h
#include “./reporting/Reporter.h
#include “./reporting/CoutLogger.h
#include “./macros.h
#include “./internals.h
#include <vector>
file audio.h
file Component.h
#include “./Config.h
file Config.cpp
#include “Config.h
file Config.h
#include <CoreLabs/string.h>
#include <windows.h>
file graphics.h
file ChannelFlags.h
#include <CoreLabs/root.h>
file ChannelOrder.cpp
#include “ChannelOrder.h

Defines

DEFINE_CASE(name)
file ChannelOrder.h
#include <CoreLabs/string.h>
file ClearFlags.h
#include <CoreLabs/root.h>
file Color.cpp
#include “Color.h
file Color.h
#include “./ChannelOrder.h
file ComparisonFunction.h
#include <CoreLabs/root.h>
file DepthStencilFormat.h
#include <CoreLabs/root.h>
file GraphicsSystem.cpp
#include “GraphicsSystem.h
#include <CoreLabs/logging.h>

Defines

XL7_GRAPHICS_IMPL_NAME

Typedefs

using GraphicsSystemImpl = xl7::graphics::impl::direct3d9::GraphicsSystemImpl
file GraphicsSystem.h
#include “../Component.h
#include “./RenderingDevice.h
#include <functional>

Defines

XL7_GRAPHICS_IMPL_DEFAULT
XL7_GRAPHICS_IMPL

Enums

Values:

enumerator XL7_GRAPHICS_IMPL_DIRECT3D9
enumerator XL7_GRAPHICS_IMPL_DIRECT3D11
file Image.cpp
#include “Image.h
#include “../PixelBitKit.h
file Image.h
#include “../PixelFormat.h
#include “../ChannelOrder.h
file ImageConverter.cpp
#include “ImageConverter.h
#include <CoreLabs/bits.h>
#include <CoreLabs/logging.h>
file ImageConverter.h
#include “./ImageProcessor.h
file ImageHandler.cpp
#include “ImageHandler.h
#include <CoreLabs/io/file.h>
#include <CoreLabs/logging.h>
file ImageHandler.h
#include “./Image.h
#include <CoreLabs/io/irom.h>
#include <CoreLabs/string.h>
file ImageProcessor.cpp
#include “ImageProcessor.h
#include <CoreLabs/bits.h>
#include <CoreLabs/logging.h>
file ImageProcessor.h
#include “./Image.h
#include “../Color.h
#include “../PixelBitKit.h
file ImageResizer.cpp
#include “ImageResizer.h
#include <CoreLabs/bits.h>
#include <CoreLabs/logging.h>
#include <cmath>
file ImageResizer.h
#include “./ImageProcessor.h
#include “./ResamplingMethod.h
file ImageStack.cpp
#include “ImageStack.h
file ImageStack.h
#include “./Image.h
file PngImageHandler.cpp
#include “PngImageHandler.h
#include <CoreLabs/logging.h>
#include <CoreLabs/bits.h>
#include <cstring>
file PngImageHandler.h
#include “./ImageHandler.h
file ResamplingMethod.h
#include <CoreLabs/root.h>
file TargaImageHandler.cpp
#include “TargaImageHandler.h
#include <CoreLabs/logging.h>
#include <CoreLabs/bits.h>
file TargaImageHandler.h
#include “./ImageHandler.h
file errors.cpp
#include “errors.h
#include <CoreLabs/strings.h>
#include <CoreLabs/sstream.h>
#include <windows.h>
file errors.cpp
#include “errors.h
#include “../shared/errors.h
file errors.cpp
#include “errors.h
#include <CoreLabs/sstream.h>
#include <d3d9.h>
file errors.cpp
#include “errors.h
file errors.h
#include <CoreLabs/string.h>
file errors.h
#include <CoreLabs/errors.h>
file errors.h
#include <CoreLabs/errors.h>
file errors.h
#include <CoreLabs/errors.h>
file GraphicsSystemImpl.cpp
#include “GraphicsSystemImpl.h
#include “./RenderingDeviceImpl.h
#include “./errors.h
#include <CoreLabs/logging.h>
file GraphicsSystemImpl.cpp
#include “GraphicsSystemImpl.h
#include “./RenderingDeviceImpl.h
#include <CoreLabs/logging.h>
file GraphicsSystemImpl.h
#include “../../GraphicsSystem.h
#include “./prerequisites.h
file GraphicsSystemImpl.h
#include “../../GraphicsSystem.h
#include “./prerequisites.h
file mappings.cpp
#include “mappings.h
file mappings.cpp
#include “mappings.h
file mappings.h
#include “../../PixelFormat.h
#include “../../ChannelOrder.h
#include “./prerequisites.h
file mappings.h
#include “../../PixelFormat.h
#include “../../ChannelOrder.h
#include “./prerequisites.h
file IndexBufferImpl.cpp
#include “IndexBufferImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../mappings.h
#include “../errors.h
#include <CoreLabs/logging.h>
file IndexBufferImpl.cpp
#include “IndexBufferImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../mappings.h
#include “../errors.h
#include <CoreLabs/logging.h>
file IndexBufferImpl.h
#include “../prerequisites.h
file IndexBufferImpl.h
#include “../prerequisites.h
file VertexBufferImpl.cpp
#include “VertexBufferImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../mappings.h
#include “../errors.h
#include <CoreLabs/logging.h>
file VertexBufferImpl.cpp
#include “VertexBufferImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../mappings.h
#include “../errors.h
#include <CoreLabs/logging.h>
file VertexBufferImpl.h
#include “../prerequisites.h
file VertexBufferImpl.h
#include “../prerequisites.h
file prerequisites.h
#include <CoreLabs/root.h>
#include <d3d11_1.h>
#include <wrl/client.h>

Typedefs

using ID3D11DeviceN = ID3D11Device1
using ID3D11DeviceContextN = ID3D11DeviceContext1
using IDXGIFactoryN = IDXGIFactory2
using IDXGIAdapterN = IDXGIAdapter
using IDXGIDeviceN = IDXGIDevice2
using IDXGISwapChainN = IDXGISwapChain
using DXGI_SWAP_CHAIN_DESCn = DXGI_SWAP_CHAIN_DESC
file prerequisites.h
#include <CoreLabs/root.h>
#include <d3d9.h>
#include <wrl/client.h>
file RenderingContextImpl.cpp
#include “RenderingContextImpl.h
#include “./RenderingDeviceImpl.h
#include “./errors.h
#include <CoreLabs/logging.h>
file RenderingContextImpl.cpp
#include “RenderingContextImpl.h
#include “./RenderingDeviceImpl.h
#include “./errors.h
#include <CoreLabs/logging.h>
file RenderingContextImpl.h
#include “../../RenderingContext.h
#include “./prerequisites.h
file RenderingContextImpl.h
#include “../../RenderingContext.h
#include “./prerequisites.h
#include <unordered_map>
file RenderingDeviceImpl.cpp
#include “RenderingDeviceImpl.h
#include “./GraphicsSystemImpl.h
#include “./RenderingContextImpl.h
#include “./ResourceFactoryImpl.h
#include “./mappings.h
#include “./errors.h
#include <CoreLabs/logging.h>
file RenderingDeviceImpl.cpp
#include “RenderingDeviceImpl.h
#include “./GraphicsSystemImpl.h
#include “./RenderingContextImpl.h
#include “./ResourceFactoryImpl.h
#include “./mappings.h
#include “./errors.h
#include <CoreLabs/logging.h>
#include <CoreLabs/strings.h>
#include <dxgi.h>
file RenderingDeviceImpl.h
#include “../../RenderingDevice.h
#include “./prerequisites.h
#include <unordered_map>
file RenderingDeviceImpl.h
#include “../../RenderingDevice.h
#include “./prerequisites.h
file ResourceFactoryImpl.cpp
#include “ResourceFactoryImpl.h
file ResourceFactoryImpl.cpp
#include “ResourceFactoryImpl.h
file ResourceFactoryImpl.h
#include “../../IResourceFactory.h
file ResourceFactoryImpl.h
#include “../../IResourceFactory.h
file ConstantBufferImpl.cpp
#include “ConstantBufferImpl.h
file ConstantBufferImpl.cpp
#include “ConstantBufferImpl.h
file ConstantBufferImpl.h
#include “../prerequisites.h
file ConstantBufferImpl.h
#include “../prerequisites.h
file D3DConstantBufferWrapper.cpp
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../errors.h
#include <CoreLabs/logging.h>
file D3DConstantBufferWrapper.h
#include “../prerequisites.h
file D3DShaderReflection.cpp
#include “D3DShaderReflection.h
#include “../errors.h
#include <CoreLabs/logging.h>
#include <d3dcompiler.h>
#include <wrl/client.h>
file D3DShaderReflection.cpp
#include “D3DShaderReflection.h
#include <CoreLabs/logging.h>
file D3DShaderReflection.h
file D3DShaderReflection.h
file PixelShaderImpl.cpp
#include “PixelShaderImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../errors.h
#include “./D3DShaderReflection.h
#include <CoreLabs/logging.h>
file PixelShaderImpl.cpp
#include “PixelShaderImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../errors.h
#include “./D3DShaderReflection.h
#include <CoreLabs/logging.h>
file PixelShaderImpl.h
#include “../prerequisites.h
file PixelShaderImpl.h
#include “../prerequisites.h
file VertexShaderImpl.cpp
#include “VertexShaderImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../errors.h
#include “./D3DShaderReflection.h
#include <CoreLabs/logging.h>
file VertexShaderImpl.cpp
#include “VertexShaderImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../errors.h
#include “./D3DShaderReflection.h
#include <CoreLabs/logging.h>
file VertexShaderImpl.h
#include “../prerequisites.h
file VertexShaderImpl.h
#include “../prerequisites.h
file BlendStateImpl.cpp
#include “BlendStateImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../errors.h
#include <CoreLabs/logging.h>
file BlendStateImpl.cpp
#include “BlendStateImpl.h
file BlendStateImpl.h
#include “../prerequisites.h
file BlendStateImpl.h
#include “../prerequisites.h
file DepthStencilStateImpl.cpp
#include “DepthStencilStateImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../mappings.h
#include “../errors.h
#include <CoreLabs/logging.h>
file DepthStencilStateImpl.cpp
#include “DepthStencilStateImpl.h
#include “../mappings.h
file DepthStencilStateImpl.h
#include “../prerequisites.h
file DepthStencilStateImpl.h
#include “../prerequisites.h
file RasterizerStateImpl.cpp
#include “RasterizerStateImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../errors.h
#include <CoreLabs/logging.h>
file RasterizerStateImpl.cpp
#include “RasterizerStateImpl.h
file RasterizerStateImpl.h
#include “../prerequisites.h
file RasterizerStateImpl.h
#include “../prerequisites.h
file SamplerStateImpl.cpp
#include “SamplerStateImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../errors.h
#include <CoreLabs/logging.h>
file SamplerStateImpl.cpp
#include “SamplerStateImpl.h
file SamplerStateImpl.h
#include “../prerequisites.h
file SamplerStateImpl.h
#include “../prerequisites.h
file Texture2DImpl.cpp
#include “Texture2DImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../mappings.h
#include “../errors.h
#include <CoreLabs/logging.h>
file Texture2DImpl.cpp
#include “Texture2DImpl.h
#include “../GraphicsSystemImpl.h
#include “../RenderingDeviceImpl.h
#include “../mappings.h
#include “../errors.h
#include <CoreLabs/logging.h>
file Texture2DImpl.h
#include “../prerequisites.h
file Texture2DImpl.h
#include “../prerequisites.h
file D3DBlendStateTypeValues.h
#include “../prerequisites.h
#include <array>
file D3DDepthStencilStateTypeValues.h
#include “../prerequisites.h
#include <array>
file D3DRasterizerStateTypeValues.h
#include “../prerequisites.h
#include <array>
file D3DSamplerStateTypeValues.h
#include “../prerequisites.h
#include <array>
file ComposedVertexLayout.cpp
#include “ComposedVertexLayout.h
file ComposedVertexLayout.h
#include “./VertexBufferBinding.h
file VertexBufferBinding.cpp
#include “VertexBufferBinding.h
file VertexBufferBinding.h
file D3DShaderCompiler.cpp
#include “D3DShaderCompiler.h
#include “../errors.h
#include <CoreLabs/logging.h>
#include <CoreLabs/strings.h>
#include <algorithm>
#include <filesystem>
#include <fstream>
#include <unordered_map>
#include <vector>
#include <d3dcompiler.h>
#include <wrl/client.h>
file D3DShaderCompiler.h
#include <CoreLabs/string.h>
file IResourceFactory.h
#include “./meshes/IMeshFactory.h
#include “./states/IStateFactory.h
file IMeshFactory.h
#include “./VertexBuffer.h
#include “./IndexBuffer.h
file IndexBuffer.cpp
#include “IndexBuffer.h
#include “./MeshUtil.h
file IndexBuffer.h
#include “./MeshBuffer.h
#include “./IndexType.h
#include “./IndexDataProvider.h
file IndexDataProvider.h
file IndexType.h
#include <CoreLabs/root.h>
file MeshBuffer.cpp
#include “MeshBuffer.h
#include <CoreLabs/logging.h>
file MeshBuffer.h
#include “./Topology.h
#include “./MeshUtil.h
file MeshManager.cpp
#include “MeshManager.h
#include <CoreLabs/logging.h>
file MeshManager.h
#include “./IMeshFactory.h
file MeshUtil.cpp
#include “MeshUtil.h
file MeshUtil.h
#include “./VertexLayout.h
#include “./IndexType.h
#include “./Topology.h
file Topology.h
#include <CoreLabs/root.h>
file VertexBuffer.cpp
#include “VertexBuffer.h
file VertexBuffer.h
#include “./MeshBuffer.h
#include “./VertexLayout.h
#include “./VertexDataProvider.h
file VertexDataProvider.h
file VertexLayout.cpp
#include “VertexLayout.h
file VertexLayout.h
#include <CoreLabs/root.h>
#include <vector>
file AbstractPipelineObject.h
#include <CoreLabs/root.h>
#include <array>

Defines

XL7_GRAPHICS_PIPELINE_SINGLE_STATE(name, type, default_value, dirty_flag)
XL7_GRAPHICS_PIPELINE_GENERIC_STATE_BEING(name, type, default_value, dirty_flag)
XL7_GRAPHICS_PIPELINE_SPECIFIC_STATE_PROXY(name, type, generic_name, type_cast)
XL7_GRAPHICS_PIPELINE_STATE_ARRAY(name, count, type, default_value, dirty_flag_base)
XL7_GRAPHICS_PIPELINE_STATE_ARRAY_DEFAULT0(name, count, type, default_value, dirty_flag_base)
file AbstractShaderStage.h
#include “./AbstractStage.h
#include “../shaders/Shader.h
#include “../textures/Texture.h
#include “../states/SamplerState.h
file AbstractStage.h
file InputAssemblerStage.h
#include “./AbstractStage.h
#include “../meshes/VertexBuffer.h
#include “../meshes/IndexBuffer.h
file OutputMergerStage.h
#include “./AbstractStage.h
#include “../states/BlendState.h
#include “../Color.h
file Pipeline.h
#include “./InputAssemblerStage.h
#include “./VertexShaderStage.h
#include “./RasterizerStage.h
#include “./PixelShaderStage.h
#include “./OutputMergerStage.h
file PixelShaderStage.h
#include “./AbstractShaderStage.h
#include “../shaders/PixelShader.h
file RasterizerStage.h
#include “./AbstractStage.h
#include “../Viewport.h
file VertexShaderStage.h
#include “./AbstractShaderStage.h
file PixelBitKit.cpp
#include “PixelBitKit.h
#include <array>
#include <cstring>
file PixelBitKit.h
#include “./PixelFormat.h
#include “./ChannelOrder.h
file PixelFormat.cpp
#include “PixelFormat.h

Defines

DEFINE_CASE(name)
file PixelFormat.h
#include <CoreLabs/string.h>
file RenderingContext.cpp
#include “RenderingContext.h
#include “./GraphicsSystem.h
#include <CoreLabs/logging.h>
#include <CoreLabs/memory.h>
file RenderingContext.h
#include “./pipeline/Pipeline.h
#include “./ClearFlags.h
#include “./Color.h
file RenderingDevice.cpp
#include “RenderingDevice.h
#include “./GraphicsSystem.h
#include <CoreLabs/logging.h>
#include <CoreLabs/memory.h>
file RenderingDevice.h
#include “./RenderingContext.h
#include “./IResourceFactory.h
#include “./meshes/MeshManager.h
#include “./states/StateManager.h
#include <CoreLabs/Version.h>
#include <vector>
file CodeDataProvider.cpp
#include “CodeDataProvider.h
file CodeDataProvider.h
#include “./ShaderCode.h
#include “./CompileOptions.h
file CompileOptions.h
#include <CoreLabs/string.h>
#include <map>
file ConstantBuffer.cpp
#include “ConstantBuffer.h
#include <CoreLabs/logging.h>
file ConstantBuffer.h
#include “./ConstantBufferLayout.h
#include “./ConstantDataProvider.h
file ConstantBufferDeclaration.h
#include “./ConstantBufferLayout.h
#include <CoreLabs/string.h>
file ConstantBufferLayout.cpp
#include “ConstantBufferLayout.h
#include <algorithm>
file ConstantBufferLayout.h
#include “./ConstantDeclaration.h
#include <vector>
file ConstantBufferMapping.cpp
#include “ConstantBufferMapping.h
#include <algorithm>
file ConstantBufferMapping.h
#include “./ConstantMapping.h
#include <vector>
file ConstantClass.h
#include <CoreLabs/root.h>
file ConstantDataProvider.h
file ConstantDeclaration.h
#include “./ConstantType.h
#include “./ConstantClass.h
#include <CoreLabs/string.h>
file ConstantMapping.h
#include “./ConstantType.h
file ConstantType.h
#include <CoreLabs/root.h>
file IShaderFactory.h
#include “./ConstantBuffer.h
#include “./VertexShader.h
#include “./PixelShader.h
file PixelShader.cpp
#include “PixelShader.h
file PixelShader.h
#include “./Shader.h
file ReflectionResult.h
#include <vector>
file Shader.cpp
#include “Shader.h
#include “./ConstantBuffer.h
#include <CoreLabs/logging.h>
#include <algorithm>
file Shader.h
#include “./ShaderCode.h
#include “./CodeDataProvider.h
#include “./CompileOptions.h
#include “./ReflectionResult.h
#include <unordered_map>
file ShaderCode.cpp
#include “ShaderCode.h
#include <CoreLabs/strings.h>
file ShaderCode.h
#include <CoreLabs/string.h>
file ShaderManager.cpp
#include “ShaderManager.h
file ShaderManager.h
#include “./IShaderFactory.h
file TextureSamplerDeclaration.h
#include <CoreLabs/string.h>
file VertexShader.cpp
#include “VertexShader.h
file VertexShader.h
#include “./Shader.h
file AbstractState.cpp
#include “AbstractState.h
#include <CoreLabs/logging.h>
file AbstractState.h
file BlendState.cpp
#include “BlendState.h
file BlendState.h
#include “./AbstractState.h
#include “../ChannelFlags.h
file DepthStencilState.cpp
#include “DepthStencilState.h
file DepthStencilState.h
#include “./AbstractState.h
#include “../ComparisonFunction.h
file IStateFactory.h
#include “./SamplerState.h
#include “./RasterizerState.h
#include “./DepthStencilState.h
#include “./BlendState.h
file RasterizerState.cpp
#include “RasterizerState.h
file RasterizerState.h
#include “./AbstractState.h
file SamplerState.cpp
#include “SamplerState.h
file SamplerState.h
#include “./AbstractState.h
#include “../Color.h
#include <cfloat>
file StateManager.cpp
#include “StateManager.h
#include <DataLabs/Base64.h>
file StateManager.h
#include “./IStateFactory.h
file ColorRenderTarget.cpp
#include “ColorRenderTarget.h
file ColorRenderTarget.h
#include “./RenderTarget.h
file DepthStencilTarget.cpp
#include “DepthStencilTarget.h
file DepthStencilTarget.h
#include “./RenderTarget.h
file ISurfaceFactory.h
file RenderTarget.cpp
#include “RenderTarget.h
file RenderTarget.h
#include “./Surface.h
#include “../Viewport.h
file Surface.cpp
#include “Surface.h
#include <CoreLabs/logging.h>
file Surface.h
file SurfaceManager.cpp
#include “SurfaceManager.h
file SurfaceManager.h
#include “./ISurfaceFactory.h
file Cubemap.cpp
#include “Cubemap.h
file Cubemap.h
#include “./Texture.h
file ImageDataProvider.cpp
#include “ImageDataProvider.h
file ImageDataProvider.h
#include “../images/Image.h
#include “../images/ImageStack.h
file ITextureFactory.h
#include “./Texture2D.h
#include “./Texture3D.h
#include “./Texture2DArray.h
#include “./Cubemap.h
file Texture.cpp
#include “Texture.h
#include “../GraphicsSystem.h
#include “../RenderingDevice.h
#include “../PixelBitKit.h
#include “../images/ImageResizer.h
#include <CoreLabs/logging.h>
file Texture.h
#include “../PixelFormat.h
#include “../ChannelOrder.h
#include “./ImageDataProvider.h
file Texture2D.cpp
#include “Texture2D.h
file Texture2D.h
#include “./Texture.h
file Texture2DArray.cpp
#include “Texture2DArray.h
file Texture2DArray.h
#include “./Texture.h
file Texture3D.cpp
#include “Texture3D.h
file Texture3D.h
#include “./Texture.h
file TextureManager.cpp
#include “TextureManager.h
file TextureManager.h
#include “./ITextureFactory.h
file Viewport.h
#include <CoreLabs/root.h>
file input.h
file MainWindow.cpp
#include “MainWindow.h
#include <CoreLabs/errors.h>
#include <CoreLabs/logging.h>
#include <CoreLabs/strings.h>
file MainWindow.h
#include “./Component.h
#include <CoreLabs/string.h>
#include <windows.h>
file DataProvider.cpp
#include “DataProvider.h
file DataProvider.h
file DefaultDataProvider.cpp
#include “DefaultDataProvider.h
#include <algorithm>
file DefaultDataProvider.h
#include “./DataProvider.h
file Resource.cpp
#include “Resource.h
#include “./ResourceManager.h
#include <CoreLabs/logging.h>
#include <CoreLabs/strings.h>
file Resource.h
#include “./ResourceID.h
#include “./ResourceUsage.h
#include “./DefaultDataProvider.h
#include <CoreLabs/string.h>
file ResourceID.cpp
#include “ResourceID.h
file ResourceID.h
#include <CoreLabs/root.h>

Defines

XL7_DECLARE_RESOURCE_ID()
XL7_DERIVE_RESOURCE_ID(TBase)
file ResourceManager.cpp
#include “ResourceManager.h
file ResourceManager.h
#include “./Resource.h
#include <CoreLabs/string.h>
#include <vector>
#include <unordered_map>
#include <functional>
file ResourceUsage.h
#include <CoreLabs/root.h>
dir /home/runner/work/flangee77/flangee77/flangee77/src/DataLabs/compression
dir /home/runner/work/flangee77/flangee77/flangee77/src/CoreLabs
dir /home/runner/work/flangee77/flangee77/flangee77/src/CoreLabs/creational
dir /home/runner/work/flangee77/flangee77/flangee77/src/DataLabs
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl/direct3d11
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl/direct3d9
dir /home/runner/work/flangee77/flangee77/flangee77/src/TestLabs/exceptions
dir /home/runner/work/flangee77/flangee77/flangee77
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/images
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl
dir /home/runner/work/flangee77/flangee77/flangee77/src/CoreLabs/io
dir /home/runner/work/flangee77/flangee77/flangee77/src/DataLabs/json
dir /home/runner/work/flangee77/flangee77/flangee77/src/CoreLabs/logging
dir /home/runner/work/flangee77/flangee77/flangee77/src/MathLabs
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl/direct3d11/meshes
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl/direct3d9/meshes
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl/shared/meshes
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/meshes
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/pipeline
dir /home/runner/work/flangee77/flangee77/flangee77/src/CoreLabs/profiling
dir /home/runner/work/flangee77/flangee77/flangee77/src/ProgLabs
dir /home/runner/work/flangee77/flangee77/flangee77/src/TestLabs/reporting
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/resources
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl/direct3d11/shaders
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl/direct3d9/shaders
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl/shared/shaders
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/shaders
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl/shared
dir /home/runner/work/flangee77/flangee77/flangee77/src
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl/direct3d11/states
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl/direct3d9/states
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/states
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/surfaces
dir /home/runner/work/flangee77/flangee77/flangee77/src/DataLabs/syntax
dir /home/runner/work/flangee77/flangee77/flangee77/src/CoreLabs/system
dir /home/runner/work/flangee77/flangee77/flangee77/src/TestLabs
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl/direct3d11/textures
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/impl/direct3d9/textures
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs/graphics/textures
dir /home/runner/work/flangee77/flangee77/flangee77/src/XiaoLabs